| Method | Description | Returns |
|---|---|---|
| getValuesList() | Gets values array that is suitable to be used in tag. In this case every key equals to its value. |
array |
| getPlaceholder() | Gets placeholder for this content based on its value. Usually returns encoded value of a content text. If content is a multiselect, returns all its values separated by comma. Returned value is encoded and can be used in HTML attributes (usually in "placeholder"). |
string |
| getIframeSrcText() | Get the escaped source of the text for the use within an iframe src tag | string |
| isBlank() | Return the information that this is not blank content | bool |
| getText() | Get the text for this content. Also parses image and link placeholders in the process. | string |
| getDate() | Get the date from the content | DateTime |
| getRecordModel() | Retrieve the model associated with the content for content with the 'record' category | Model |
| getRecordModels() | Retrieve the models associated with the content for content with the 'records' category | Collection |
| getId() | int | |
| getCreated() | DateTime | |
| getModified() | DateTime | |
| getComponent() | Component | |
| getGlobalComponent() | GlobalComponent | |
| getImage() | Image | |
| getFile() | File | |
| getType() | InputType | |
| getWidget() | Widget | |
| getCollection() | Collection | |
| getContainer() | Model | |
| getValues() | Gets values of the content in array representation. Should be used for "multiselect" input type. Otherwise, it will always be an empty array. | array |
| isEmpty() | Checks if the content is empty | bool |
| 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 |
| getRecordId() | Get the record id for the content | int |
| getRecordIds() | Get the record ids for the content | array |
Common\Models\Backend\Content
Content