PHP Класс Cake\ElasticSearch\View\Form\DocumentContext

Наследование: implements Cake\View\Form\ContextInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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}

Защищенные методы

Метод Описание
_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.

Описание методов

__construct() публичный Метод

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

_prepare() защищенный Метод

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
Результат void

attributes() публичный Метод

{@inheritDoc}
public attributes ( $field )

entity() защищенный Метод

Get the entity that is closest to $path.
protected entity ( array $path ) : Cake\Datasource\EntityInterface | false
$path array The to get an entity for.
Результат Cake\Datasource\EntityInterface | false The entity or false.

error() публичный Метод

{@inheritDoc}
public error ( $field )

fieldNames() публичный Метод

{@inheritDoc}
public fieldNames ( )

getProp() защищенный Метод

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.
Результат mixed

getValidator() защищенный Метод

Get the validator for the current type.
protected getValidator ( ) : Cake\Validation\Validator
Результат Cake\Validation\Validator The validator for the type.

hasError() публичный Метод

{@inheritDoc}
public hasError ( $field )

isCreate() публичный Метод

{@inheritDoc}
public isCreate ( )

isPrimaryKey() публичный Метод

{@inheritDoc}
public isPrimaryKey ( $field )

isRequired() публичный Метод

{@inheritDoc}
public isRequired ( $field )

primaryKey() публичный Метод

{@inheritDoc}
public primaryKey ( )

type() публичный Метод

{@inheritDoc}
public type ( $field )

val() публичный Метод

{@inheritDoc}
public val ( $field )

Описание свойств

$_context защищенное свойство

The context data
protected array $_context
Результат array

$_isCollection защищенное свойство

Boolean to track whether or not the entity is a collection.
protected bool $_isCollection
Результат boolean

$_request защищенное свойство

The request object.
protected Request,Cake\Network $_request
Результат Cake\Network\Request

$_rootName защищенное свойство

The name of the top level entity/type object.
protected string $_rootName
Результат string