Method |
Description |
|
deleteBlockById ( array\int $blockIds ) : boolean |
Deletes a block (or series of blocks) by it's ID from the database. |
|
deleteBlockType ( Neo_BlockTypeModel $blockType ) : boolean |
Deletes a block type from the database. |
|
deleteField ( craft\FieldModel $neoField ) |
Deletes a Neo field from the database. |
|
deleteGroupsByFieldId ( $fieldId ) : boolean |
Deletes all groups associated with a field from the database. |
|
deleteStructure ( NeoFieldType $fieldType ) : boolean |
Deletes the structure for a field from the database. |
|
getBlockById ( integer $blockId, integer | null $localeId = null ) : Neo_BlockModel |
Returns a block given it's ID. |
|
getBlockTypeById ( $blockTypeId ) : Neo_BlockTypeModel |
Finds a block type by it's ID. |
|
getBlockTypesByFieldId ( $fieldId, string | null $indexBy = null ) : array |
Returns a list of block types associated with a field. |
|
getBlocks ( integer $fieldId, integer $ownerId, string | null $locale = null ) : array |
|
|
getCriteria ( mixed | null $attributes = null ) : Neo_CriteriaModel |
Creates a Neo-specific element criteria model. |
|
getGroupsByFieldId ( $fieldId, string | null $indexBy = null ) : array |
Returns a list of groups associated with a field. |
|
getStructure ( NeoFieldType $fieldType ) : craft\StructureModel | boolean |
Returns the structure for a field. |
|
isPreviewMode ( ) : boolean |
Checks the current route/environment to see if database calls for Neo blocks should be avoided. |
|
renderBlockTabs ( Neo_BlockTypeModel $blockType, Neo_BlockModel $block = null, string $namespace = '', boolean | false $static = false, $locale = null ) : array |
Builds the HTML for an individual block type. |
|
requirePlugin ( $plugin ) |
Forces a plugin to exist by throwing an error if it doesn't. |
|
saveBlock ( Neo_BlockModel $block, boolean | true $validate = true ) : boolean |
Saves a block to the database. |
|
saveBlockCollapse ( Neo_BlockModel $block ) : boolean |
Saves a block's expansion state to the database. |
|
saveBlockType ( Neo_BlockTypeModel $blockType, boolean | true $validate = true ) : boolean |
Saves a block type to the database. |
|
saveFieldValue ( NeoFieldType $fieldType ) |
Saves a Neo field's value to the database. |
|
saveGroup ( Neo_GroupModel $group ) : boolean |
Saves a group to the database. |
|
saveSettings ( Neo_SettingsModel $settings, boolean | true $validate = true ) : boolean |
Saves a field's settings to the database. |
|
saveStructure ( craft\StructureModel $structure, NeoFieldType $fieldType ) : boolean |
Saves the structure for a field to the database. |
|
validateBlock ( Neo_BlockModel $block ) : boolean |
Runs validation on a block, and saves any errors to the block. |
|
validateBlockType ( Neo_BlockTypeModel $blockType, boolean | true $validateUniques = true ) : boolean |
Runs validation on a block type, and saves any errors to the block type. |
|
validateFieldSettings ( Neo_SettingsModel $settings ) : boolean |
Validates a field's settings, loading the settings and block type models with any error messages. |
|