Method | Description | Returns |
---|---|---|
isLocal() | Returns the information that this is not a local component | bool |
isGlobal() | Returns the information that this is a global component | bool |
isBlank() | Returns the information that this is not a blank component | bool |
getHtml(array $variables) | Get the rendered html content for this component. Uses the active revision of the global component. | string |
getAreaType(string $areaName) | Get the input type for the specified layout area, using the active revision of the record. Returns null if the area with the specified name could not be found. | InputType |
getAreaCategory(string $areaName) | Get the category for the specified layout area, using the active revision of the record. Returns null if the area with the specified name could not be found. | string |
getAreaEditor(string $areaName) | Get the editor for the specified layout area, using the active revision of the record. Returns null if the area with the specified name could not be found. | string |
getAreaImage(string $areaName) | Get the image for the layout area with the specified name, using the active revision of the record | Image |
getAreaRecord(string $areaName) | Get the record for the layout area with the specified name, using the active revision of the record | Model |
getAreaRecords(string $areaName) | Get the records for the layout area with the specified name, using the active revision of the record | Collection |
getAreaText(string $areaName) | Get the text for the layout area with the specified name, using the active revision of the record | string |
getAreaValues(string $areaName) | Get the values for the layout area with the specified name, using the active revision of the record | array |
getAreaHtml(string $areaName) | Get the rendered HTML for the component area with the specified name, using the active revision of the record. Adds live preview tags, if enabled. | string |
getAreaDate(string $areaName) | Get a date for the layout area with the specified name, using the active revision of the record | DateTime |
getAreaWidget(string $areaName) | Get the widget for the layout area with the specified name, using the active revision of the record | Widget |
getAreaComponent(string $areaName) | Get the component for the layout area with the specified name, using the active revision of the record | Component |
getAreaCollectionElements(string $areaName) | Get the component collection elements for the layout area with the specified name, using the active revision of the record | Collection |
getAreaContent(string $areaName) | Get the content of the component area Uses the active revision of the global component. | Content |
getAreaDefaultContent(string $areaName) | Get the default content of the layout area. Uses the active revision of the global component. Will return a BlankContent if no content was defined. | Content |
getAreaContentOrDefault(string $areaName) | Get the content of the layout area, or the default content if no content exists. Uses the active revision of the global component. If no default content exists, a BlankContent will be returned. | Content |
getAreaAttributesContent(string $areaName) | Gets the content of every layout area attribute. If layout area does not have attributes, returns empty array. Uses the active revision of the global component. | array |
getAreaAttributesDefaultContent(string $areaName) | Gets the default content of every layout area attribute. If layout area does not have attributes, returns empty array. Uses the active revision of the global component. | array |
getAreaAttributesContentOrDefault(string $areaName) | Gets the content (or the default content if no content exists) of every layout area attribute. If layout area does not have attributes, returns empty array. Uses the active revision of the global component. | array |
getEntityAreaByLayoutArea(LayoutArea $area) | Get the link record between the layout area and content for the designated layout area. Uses the active revision of the global component. | Model |
getAreas() | Get the layout areas this component is associated with | Collection |
getAreaGroups() | Gets the layout area groups this component is associated with | Collection |
getComponentAreas() | Get the component areas from the active revision Uses the active revision of the global component. | Collection |
isUsedInContent() | Check if the component is used in content | bool |
getNumUsedInContent() | Determine how often this global component has been used in the content (or component collections) | int |
getId() | int | |
getName() | string | |
getIdentifier() | string | |
getLayout() | Layout | |
getCreated() | Get the date the record was created. | DateTime |
getModified() | Get the last modification date for the record. | DateTime |
getHidden() | DateTime | |
getSite() | Site | |
getActiveRevision() | GlobalComponentRevision | |
getRevisionById(int $id) | Get the revision with the specified id | GlobalComponentRevision |
getRevisions() | Collection (GlobalComponentRevision) | |
getLastRevision() | Get the last revision for the entity. If a revision has been added, this will be the newly added revision. | GlobalComponentRevision |
getCopiedComponents() | Collection (Component) | |
getTags() | Collection (Tag) | |
getCategories() | Collection (Category) | |
isNewRecord() | Check if the record is a new record | bool |
isHierarchicalModel() | Check whether a model is a hierarchical model, i.e. can have children | bool |
isVersionedModel() | Check whether a model is versioned | bool |
hasAreaWithName(string $areaName) | Check if an area with the specified name exists for the active revision of the record | bool |
getAreaImageOrPlaceholder(string $areaName, int $width, int $height) | Get the image for the component area with the specified name. Uses the active revision of the global component. If the image does not exist, get a placeholder image with the specified dimensions Will always return an image, even if it was not found (in that case, an empty image). | Image |
getAreaFile(string $areaName) | Get the file for the layout area with the specified name, using the active revision of the record | File |
Common\Models\Frontend\GlobalComponent
GlobalComponent