PHP Class Cake\ElasticSearch\View\Form\DocumentContext

Inheritance: implements Cake\View\Form\ContextInterface
Afficher le fichier Open project: cakephp/elastic-search

Protected Properties

Свойство Type Description
$_context array The context data
$_isCollection boolean Boolean to track whether or not the entity is a collection.
$_request Cake\Network\Request The request object.
$_rootName string The name of the top level entity/type object.

Méthodes publiques

Méthode Description
__construct ( Cake\Network\Request $request, array $context ) Constructor.
attributes ( $field ) {@inheritDoc}
error ( $field ) {@inheritDoc}
fieldNames ( ) {@inheritDoc}
hasError ( $field ) {@inheritDoc}
isCreate ( ) {@inheritDoc}
isPrimaryKey ( $field ) {@inheritDoc}
isRequired ( $field ) {@inheritDoc}
primaryKey ( ) {@inheritDoc}
type ( $field ) {@inheritDoc}
val ( $field ) {@inheritDoc}

Méthodes protégées

Méthode Description
_prepare ( ) : void Prepare some additional data from the context.
entity ( array $path ) : Cake\Datasource\EntityInterface | false Get the entity that is closest to $path.
getProp ( mixed $target, string $field ) : mixed Read property values or traverse arrays/iterators.
getValidator ( ) : Cake\Validation\Validator Get the validator for the current type.

Method Details

__construct() public méthode

Constructor.
public __construct ( Cake\Network\Request $request, array $context )
$request Cake\Network\Request The request object.
$context array Context info.

_prepare() protected méthode

If the table option was provided to the constructor and it was a string, TypeRegistry will be used to get the correct table instance. If an object is provided as the type option, it will be used as is. If no type option is provided, the type name will be derived based on naming conventions. This inference will work with a number of common objects like arrays, Collection objects and ResultSets.
protected _prepare ( ) : void
Résultat void

attributes() public méthode

{@inheritDoc}
public attributes ( $field )

entity() protected méthode

Get the entity that is closest to $path.
protected entity ( array $path ) : Cake\Datasource\EntityInterface | false
$path array The to get an entity for.
Résultat Cake\Datasource\EntityInterface | false The entity or false.

error() public méthode

{@inheritDoc}
public error ( $field )

fieldNames() public méthode

{@inheritDoc}
public fieldNames ( )

getProp() protected méthode

Read property values or traverse arrays/iterators.
protected getProp ( mixed $target, string $field ) : mixed
$target mixed The entity/array/collection to fetch $field from.
$field string The next field to fetch.
Résultat mixed

getValidator() protected méthode

Get the validator for the current type.
protected getValidator ( ) : Cake\Validation\Validator
Résultat Cake\Validation\Validator The validator for the type.

hasError() public méthode

{@inheritDoc}
public hasError ( $field )

isCreate() public méthode

{@inheritDoc}
public isCreate ( )

isPrimaryKey() public méthode

{@inheritDoc}
public isPrimaryKey ( $field )

isRequired() public méthode

{@inheritDoc}
public isRequired ( $field )

primaryKey() public méthode

{@inheritDoc}
public primaryKey ( )

type() public méthode

{@inheritDoc}
public type ( $field )

val() public méthode

{@inheritDoc}
public val ( $field )

Property Details

$_context protected_oe property

The context data
protected array $_context
Résultat array

$_isCollection protected_oe property

Boolean to track whether or not the entity is a collection.
protected bool $_isCollection
Résultat boolean

$_request protected_oe property

The request object.
protected Request,Cake\Network $_request
Résultat Cake\Network\Request

$_rootName protected_oe property

The name of the top level entity/type object.
protected string $_rootName
Résultat string