\LinkField
A link field which will store a link in the database.
- Author: Simon Elvery
Synopsis
class LinkField
extends DBField
implements
CompositeDBField
{
- // members
- protected $page_id;
- protected $custom_url;
- protected boolean $isChanged = false;
- private static array $composite_db = ;
- // methods
- public void setValue()
- public void requireField()
- public void writeToManipulation()
- public void addToQuery()
- public array compositeDatabaseFields()
- public boolean isChanged()
- public boolean exists()
- public void getPageID()
- public void setPageID()
- public void getCustomURL()
- public void setCustomURL()
- public FormField scaffoldFormField()
- public void Page()
- public void getURL()
- public void __toString()
- public void forTemplate()
- public void Absolute()
Hierarchy
Extends
- DBField
Implements
- CompositeDBField
Members
private
- $composite_db
—
array
Similiar to {@link DataObject::$db}, holds an array of composite field names.
protected
- $custom_url — string
- $isChanged — boolean
- $page_id — int
Methods
public
- Absolute()
- Page()
- __toString()
- addToQuery() — Add all columns which are defined through {@link requireField()} and {@link $composite_db}, or any additional SQL that is required to get to these columns. Will mostly just write to the {@link SQLQuery->select} array.
- compositeDatabaseFields() — Return array in the format of {@link $composite_db}.
- exists() — Determines if any of the properties in this field have a value, meaning at least one of them is not NULL.
- forTemplate()
- getCustomURL()
- getPageID()
- getURL()
- isChanged() — Determines if the field has been changed since its initialization.
- requireField() — Used in constructing the database schema.
- scaffoldFormField() — Returns a CompositeField instance used as a default for form scaffolding.
- setCustomURL()
- setPageID()
- setValue() — Set the value of this field in various formats.
- writeToManipulation() — Add the custom internal values to an INSERT or UPDATE request passed through the ORM with {@link DataObject->write()}.