public function __construct(Helper\HelperSet $helperSet, $model, $inputNamespace = null) { parent::__construct($helperSet); $this->model = $model; if (!$inputNamespace) { if ($model instanceof Collection) { $arr = $model->toArray(); if ($arr) { $object = get_class(current($arr)); } else { $object = null; } } else { $object = $model; } if ($object) { $inputNamespace = $this->helperSet->baseHelper()->objectName($object); } } $this->inputNamespace = $inputNamespace; }
public function __construct(HelperSet $helperSet) { parent::__construct($helperSet); $this->config = $this->getService('rails.config'); }