DNADesign\ElementalVirtual\Model\ElementVirtual
Virtual Linked Element.
As elemental is based on a natural has_one relation to an object,
this allows the same element to be linked to multiple pages.
{@see ElementalGridFieldAddExistingAutocompleter}
Synopsis
class ElementVirtual
extends BaseElement
{
- // members
- private static string $icon = 'font-icon-block-link';
- private static array $has_one = ;
- private static string $description = 'Reused element';
- private static string $table_name = 'ElementVirtual';
- private static string $singular_name = 'virtual block';
- private static boolean $inline_editable = false;
- // methods
- public void __construct()
- public void getCMSFields()
- public string getType()
- public boolean isInvalidPublishState()
- public string getAnchor()
- public string getSummary()
- public string getTitle()
- public string|null forTemplate()
- protected void provideBlockSchema()
Hierarchy
Extends
- DNADesign\Elemental\Models\BaseElement
Members
private
- $description — string
- $has_one
- $icon
- $inline_editable
- $singular_name
- $table_name
Methods
protected
public
- __construct()
- forTemplate() — Override to render template based on LinkedElement
- getAnchor() — Get a unique anchor name.
- getCMSFields()
- getSummary()
- getTitle()
- getType()
- isInvalidPublishState() — Detect when a user has published a linked element but has not published the LinkedElement.