Method | Description | |
---|---|---|
defineContentAttribute ( ) : boolean | Disables using the built-in content column for storing values. We will manage field values ourselves. | |
getEagerLoadingMap ( craft\BaseElementModel[] $sourceElements ) : array | Returns an array that maps source-to-target element IDs based on this custom field. | |
getInputHtml ( string $name, array $value ) : string | Builds the HTML for the input field. | |
getName ( ) | Public methods | |
getSearchKeywords ( array $value ) : string | Returns the search keywords that should be associated with this field. | |
getSettingsHtml ( ) : string | Builds the HTML for the configurator. | |
getStaticHtml ( array $value ) : string | Builds the HTML for the non-editable input field. | |
modifyElementsQuery ( craft\DbCommand $query, mixed $value ) : boolean | null | Modifies the element query. | |
onAfterElementSave ( ) | ||
onAfterSave ( ) | Saves the actual field type settings after the field type is saved. | |
onBeforeDelete ( ) | Cleans up the field and all it's settings after it gets deleted. | |
prepSettings ( array $settings ) : |
Prepares the Neo field settings before they're saved to the database. | |
prepValue ( array $value ) : |
Prepares the field's value for use in templates. | |
prepValueFromPost ( array $data ) : array | Converts the field's input value from post data to what it should be stored as in the database. | |
validate ( array $blocks ) : array | boolean | Validates the field's value (blocks). |
Method | Description | |
---|---|---|
getSettingsModel ( ) | Protected methods |
Method | Description | |
---|---|---|
_getNamespaceDepth ( ) : integer | Returns what current depth the field is nested. | |
_includeResources ( string $class, array $settings = [] ) | Includes the resource (Javascript) files for when outputting the settings or input HTML. | |
_prepareInputHtml ( integer $id, string $name, array $settings, array $value, boolean | false $static = false ) | Actually builds the HTML for the input field. The other one just calls this method. |
public defineContentAttribute ( ) : boolean | ||
return | boolean |
public getEagerLoadingMap ( craft\BaseElementModel[] $sourceElements ) : array | ||
$sourceElements | craft\BaseElementModel[] | |
return | array |
public getSearchKeywords ( array $value ) : string | ||
$value | array | |
return | string |
public getSettingsHtml ( ) : string | ||
return | string |
public getStaticHtml ( array $value ) : string | ||
$value | array | |
return | string |
public onAfterSave ( ) |
public onBeforeDelete ( ) |
public prepSettings ( array $settings ) : |
||
$settings | array | |
return |
public prepValueFromPost ( array $data ) : array | ||
$data | array | |
return | array |