Cake\View\Helper\FormHelper::__call PHP Метод

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

### Usage $this->Form->search('User.query', ['value' => 'test']); Will make an input like: The first argument to an input type should always be the fieldname, in Model.field format. The second argument should always be an array of attributes for the input.
public __call ( string $method, array $params ) : string
$method string Method name / input type to make.
$params array Parameters for the method call
Результат string Formatted input method.
    public function __call($method, $params)
    {
        $options = [];
        if (empty($params)) {
            throw new Exception(sprintf('Missing field name for FormHelper::%s', $method));
        }
        if (isset($params[1])) {
            $options = $params[1];
        }
        if (!isset($options['type'])) {
            $options['type'] = $method;
        }
        $options = $this->_initInputField($params[0], $options);
        return $this->widget($options['type'], $options);
    }