PHP Class Themosis\Field\Fields\FieldBuilder

Inheritance: extends Themosis\Foundation\DataContainer
Exibir arquivo Open project: themosis/framework Class Usage Examples

Protected Properties

Property Type Description
$properties array The field properties.
$type string The type of the input handling the value.
$view Illuminate\View\Factory A view instance.

Public Methods

Method Description
__construct ( array $properties, Illuminate\View\Factory $view ) FieldBuilder instance.
getFieldType ( ) : string Method that return the field input type.

Protected Methods

Method Description
defaultCheckableValue ( ) Define a default value as array for checkable fields.
fieldType ( ) Method to override in the child class to define its input type property.
getAllowedMimeTypes ( ) : array Return a simplified list of allowed mime types.
parseAttributes ( ) : array Parse and prepare the field tag attributes.
parseFeatures ( ) : array Parse and prepare field feature properties.
setLimit ( ) Define the limit of media files or rows we can add.
setType ( ) Set the type data of the media to insert.

Method Details

__construct() public method

FieldBuilder instance.
public __construct ( array $properties, Illuminate\View\Factory $view )
$properties array Field instance properties.
$view Illuminate\View\Factory

defaultCheckableValue() protected method

Define a default value as array for checkable fields.
protected defaultCheckableValue ( )

fieldType() protected method

Method to override in the child class to define its input type property.
protected fieldType ( )

getAllowedMimeTypes() protected method

This will automatically authorize user defined mime types.
protected getAllowedMimeTypes ( ) : array
return array

getFieldType() public method

Method that return the field input type.
public getFieldType ( ) : string
return string

parseAttributes() protected method

Parse and prepare the field tag attributes.
protected parseAttributes ( ) : array
return array The parsed attributes.

parseFeatures() protected method

Parse and prepare field feature properties.
protected parseFeatures ( ) : array
return array

setLimit() protected method

Define the limit of media files or rows we can add.
protected setLimit ( )

setType() protected method

If no type is defined, default to an array containing the 'image' mime type only. Need to "serialize" the array for output as a string value. We can use a separated list with commas.
protected setType ( )

Property Details

$properties protected_oe property

The field properties.
protected array $properties
return array

$type protected_oe property

The type of the input handling the value.
protected string $type
return string

$view protected_oe property

A view instance.
protected Factory,Illuminate\View $view
return Illuminate\View\Factory