SilverStripe\ElementalBannerBlock\Form\BlockLinkField
Synopsis
class BlockLinkField
extends FormField
{
- // members
- protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_CUSTOM;
- protected string $schemaComponent = 'BlockLinkField';
- protected ArrayData $parsedValue;
- protected bool $showLinkText = true;
- // methods
- public void Type()
- public void setValue()
- public ArrayData getParsedValue()
- public SiteTree|null getLinkPage()
- public string getLinkText()
- public string getLinkDescription()
- public bool getLinkTargetBlank()
- public string getLinkRelativeUrl()
- public $this setShowLinkText()
- public bool getShowLinkText()
- public array getAttributes()
- public void getSchemaDataDefaults()
Hierarchy
Extends
- SilverStripe\Forms\FormField
Members
protected
- $parsedValue
—
SilverStripe\View\ArrayData
Cache for parsed value - $schemaComponent
- $schemaDataType
- $showLinkText
—
SilverStripe\ElementalBannerBlock\Form\bool
Whether to show the "link text" field
Methods
public
- Type()
- getAttributes() — When not used in a React form factory context, this adds the schema and state data to SilverStripe template rendered attributes lists
- getLinkDescription() — Get the link "description", used for titles or alt text
- getLinkPage() — Get the linked {@link SiteTree} object, if available
- getLinkRelativeUrl() — Get the relative URL for the linked {@link SiteTree} object, with a leading slash
- getLinkTargetBlank() — Get whether to open the link in a new window
- getLinkText() — Get the link text/title
- getParsedValue() — Return a parsed {@link ArrayData} object from the contents of the JSON value. Will be cached for future use, and the cache will be reset via setValue each time.
- getSchemaDataDefaults() — Add some extra props for the React component to work with
- getShowLinkText() — Get whether to display the link text field
- setShowLinkText() — Set whether to display the link text field
- setValue() — Reset the cached parsed value when setting a new value