Firebrand\Hail\Models\Color
Hail Color DataObject
There is no endpoint on Hail API to get colors, they come from other objects
- Author: Maxime Rainville, Firebrand
Synopsis
class Color
extends ApiObject
{
- // members
- private static string $table_name = "HailColor";
- private static array $db = ;
- // Inherited members from ApiObject
- public static array $fetchables;
- public static $object_endpoint;
- public static array $object_parameters;
- protected static $api_map;
- // methods
- public string getThumnailField()
- // Inherited methods from ApiObject
- public void getCMSFields()
- public boolean isOutdated()
- public static boolean isFetchable()
- public ApiObject refresh()
- protected boolean importHailData()
- protected void importing()
- protected boolean excluded()
- public static void fetchForOrg()
- public static void fetchAll()
- public void canView()
- public void canDelete()
- public void canCreate()
- public void canEdit()
- protected void makeRecordViewer()
- protected void processPublicTags()
- protected void processPrivateTags()
- protected void processHeroImage()
- protected void processHeroVideo()
- protected void processAttachments()
Hierarchy
Extends
Members
private
- $db
- $table_name
protected
- $api_map
—
array
Map the fields returned by the Hail API with the SilverStripe DB Fields
public
- $fetchables
—
array
List of all the subclasses of Hail ApiObject that can be fetched from Hail - $object_endpoint
—
string
Hail API endpoint name for this object - $object_parameters
—
string
Hail API extra endpoint parameters to be passed with every request
Methods
public
- getThumnailField() — Get the Color thumbnail
Inherited from Firebrand\Hail\Models\ApiObject
protected
- excluded() — Determine if this object is to be excluded based on the provided data (public and private tags).
- importHailData() — Process the json data from Hail API and writes to SS db
- importing() — Is called by {@link importHailData()} to allow children classes to perform additional data assignment
- makeRecordViewer() — Helper function to add a ReadOnly gridfield for a relation
- processAttachments() — Go through the attachments and assign them to this object.
- processHeroImage() — Match the hero image if there's one and assign it to this object
- processHeroVideo() — Match the hero video if there's one and assign it to this object
- processPrivateTags() — Go through the list of private tags and assign them to this object.
- processPublicTags() — Go through the list of public tags and assign them to this object.
public
- canCreate() — Create permission
- canDelete() — Delete permission
- canEdit() — Edit permission
- canView() — View permission
- fetchAll() — Fetch from Hail API for all configured organisations
- fetchForOrg() — Fetch from Hail API for a specified Organisation
- getCMSFields()
- isFetchable() — Determines if the object is fetchable
- isOutdated() — Determines if the object is outdated
- refresh() — Retrieves the latest version of this object from the Hail API