NSWDPC\InlineLinker\InlineLinkCompositeField
This field is retained for BC
Synopsis
class InlineLinkCompositeField
extends InlineLinkField
{
- // Inherited constants from InlineLinkField
- const FIELD_NAME_TYPE_SEPARATOR = "___";
- const FIELD_NAME_REMOVELINK = "RemoveLink";
- const FIELD_NAME_TITLE = "Title";
- const FIELD_NAME_OPEN_IN_NEW_WINDOW = "OpenInNewWindow";
- const FIELD_NAME_TYPE = "Type";
- const LINKTYPE_EMAIL = 'Email';
- const LINKTYPE_URL = 'URL';
- const LINKTYPE_SITETREE = 'SiteTree';
- const LINKTYPE_PHONE = 'Phone';
- const LINKTYPE_FILE = 'File';
- const LINKTYPE_TYPEDEFINED = 'BasedOnType';
- // Inherited members from InlineLinkField
- protected Link|null $record;
- protected DataObject|null $parent;
- protected boolean|null $parent_inline_editable;
- protected TextField $title_field;
- protected OptionsetField $open_in_new_window_field;
- protected InlineLink_RemoveAction $remove_field;
- protected SelectionGroup $selection_group;
- protected bool $is_removing_link;
- // Inherited methods from InlineLinkField
- public void __construct()
- protected void collectChildFields()
- public $this setSubmittedValue()
- public void setTitleField()
- public InlineLink_TitleField getTitleField()
- public void setOpenInNewWindowField()
- public InlineLink_OpenInNewWindowField getOpenInNewWindowField()
- public void setRemoveField()
- public InlineLink_RemoveAction getRemoveField()
- public SelectionGroup getLinkTypeFields()
- public void hasData()
- public void canSubmitValue()
- public void collateDataFields()
- public void saveInto()
- protected Link createOrAssociateLink()
- public void setRecord()
- public mixed getRecord()
- protected bool isTypeCurrent()
- public boolean hasInlineElementalParent()
- public string prefixedFieldName()
- protected string getIndexFromName()
- public string getRecordTitle()
- public int getRecordOpenInNewWindow()
- public LiteralField CurrentLink()
- public mixed getCurrentLinkField()
- public bool hasCurrentLink()
- protected mixed getCurrentLinkTemplate()
- public CompositeField getLinkFields()
- protected void getTriggerElement()
- public InlineLinkField_Readonly performReadonlyTransformation()
Hierarchy
Constants
Name | Value |
---|---|
FIELD_NAME_TYPE_SEPARATOR | "___" |
FIELD_NAME_REMOVELINK | "RemoveLink" |
FIELD_NAME_TITLE | "Title" |
FIELD_NAME_OPEN_IN_NEW_WINDOW | "OpenInNewWindow" |
FIELD_NAME_TYPE | "Type" |
LINKTYPE_EMAIL | 'Email' |
LINKTYPE_URL | 'URL' |
LINKTYPE_SITETREE | 'SiteTree' |
LINKTYPE_PHONE | 'Phone' |
LINKTYPE_FILE | 'File' |
LINKTYPE_TYPEDEFINED | 'BasedOnType' |
Members
protected
- $is_removing_link — NSWDPC\InlineLinker\bool
- $open_in_new_window_field — SilverStripe\Forms\OptionsetField
- $parent — NSWDPC\InlineLinker\SilverStripe\ORM\DataObject|null
- $parent_inline_editable
—
NSWDPC\InlineLinker\boolean|null
Whether the parent is an inline editable Elemental element null = not detected yet true = yes, it is false = no If true, handle field namespacing, prefixing and replacement of [] in fieldnames etc. - $record — NSWDPC\InlineLinker\gorriecoe\Link\Models\Link|null
- $remove_field — NSWDPC\InlineLinker\InlineLink_RemoveAction
- $selection_group — NSWDPC\InlineLinker\SelectionGroup
- $title_field — SilverStripe\Forms\TextField
Methods
Inherited from NSWDPC\InlineLinker\InlineLinkField
protected
- collectChildFields() — Collect all fields to be used in the CompositeField
- createOrAssociateLink() — Create or save a link using the value from the form field
- getCurrentLinkTemplate() — Return a literal field template for the current link
- getIndexFromName() — Work out the index based on the field name If the parent is an inline editable element, take that into account
- getTriggerElement() — Return the element name that will trigger the signals on change The trigger element name must be namespaced
- isTypeCurrent() — Returns whether the type passed in as the current Link.Type
public
- CurrentLink()
- canSubmitValue()
- collateDataFields() — This field handles all the saving
- getCurrentLinkField()
- getLinkFields() — Return all available Link Fields Modify fields via the updateLinkFields extension method
- getLinkTypeFields()
- getOpenInNewWindowField()
- getRecord() — Get the current link record, if any
- getRecordOpenInNewWindow() — Return the OpenInNewWindow value of the current record
- getRecordTitle() — Return the title of the current record
- getRemoveField()
- getTitleField()
- hasCurrentLink() — Returns whether a current link exists and it is valid A valid Link record has a Type value and a URL
- hasData() — This field handles data
- hasInlineElementalParent() — Determine whether the parent of this field is an elemental element
- performReadonlyTransformation() — Returns a readonly version of this field
- prefixedFieldName() — Return a prefixed field name, eg. LinkTarget[Email]
- saveInto() — {@inheritdoc}
- setOpenInNewWindowField()
- setRecord() — Set the current link record
- setRemoveField()
- setSubmittedValue() — This is called just prior to saveInto, set submitted values on child fields to allow saveInto to update/create a link
- setTitleField()