Class Socialveo\Core\forms\CustomFieldsForm

InheritanceSocialveo\Core\forms\CustomFieldsForm
Uses TraitsSocialveo\Core\Translatable

Class CustomFieldsForm

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
removeFromValidation() Remove attribute from validation and add default value Socialveo\Core\forms\CustomFieldsForm

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
MODE_NETWORKS 'networks' Socialveo\Core\forms\CustomFieldsForm
MODE_PROFILE 'profile' Socialveo\Core\forms\CustomFieldsForm

Property Details

$config public property
public array $config null
$controlField public property
public $controlField null
$defaults protected property
protected array $defaults = []
$elementsClassmap public static property
public static array $elementsClassmap = ['checkbox' => \Phalcon\Forms\Element\Check::class, 'select' => 'Socialveo\Core\forms\element\Select']
$fields protected property
protected array $fields = []
$form public property
public Phalcon\Forms\Form $form null
$mode protected property
protected string $mode null
$validators public static property
public static array $validators = ['password' => '\Socialveo\Core\validation\validator\Password''uniquenessurl' => '\Socialveo\Core\validation\validator\UniquenessUrl']

Method Details

addField() public method

Add field

public void addField ( $type, $attribute, $data )
$type string
$attribute string
$data array
throws Exception
addValidators() public method

Add validators

public void addValidators ( $element, $attribute, $data )
$element Phalcon\Forms\Element
$attribute string
$data array
throws Exception
beforeValidation() public method

Rewrite validators

public void beforeValidation ( $data, $entity )
$data array
$entity object
enddef() public method

End custom hide block

public string enddef ( )
getDefaults() public method

Apply defaults data

public array getDefaults ( )
getElement() public method

Get element from name

public string|Phalcon\Forms\Element getElement ( $name )
$name string
getForm() public method

Returns form

public Phalcon\Forms\Form getForm ( )
getValidator() public method

Get validator from name

public string|Phalcon\Validation\Validator getValidator ( $name )
$name string
ifdef() public method

Custom hide block

public string ifdef ( $name )
$name string
init() public method

Init form from config

public Phalcon\Forms\Form init ( $config, $controlField, $form '\\Phalcon\\Forms\\Form', $mode self::MODE_NETWORKS )
$config array
$controlField string
$form string|object

[optional] Create form extends from class

$mode string

[optional] Mode, 'profile' or 'networks'

throws Exception
isdef() public method

Returns is def attribute Note. Works only for profile

public boolean isdef ( $name )
$name string
removeFromValidation() protected method

Remove attribute from validation and add default value

protected void removeFromValidation ( $attribute, $default '' )
$attribute string
$default mixed

[optional] Default value

render() public method

Render fields of custom networks

public string render ( $view null )
$view string

[optional]

renderField() public method

Render field

public string renderField ( $field, $options = [], $view null )
$field string
$options

[optional]

$view string

[optional]