'viewBag', 'description' => 'Stores custom template properties.' ]; } /** * @param array $properties * @return array */ public function validateProperties(array $properties) { return $properties; } /** * @param string $method * @param array $parameters * @return mixed */ public function __call($method, $parameters) { if (array_key_exists($method, $this->properties) && !method_exists($this, $method)) { return $this->properties[$method]; } return parent::__call($method, $parameters); } /** * @return array */ public function defineProperties() { $result = []; foreach ($this->properties as $name => $value) { $result[$name] = [ 'title' => $name, 'type' => 'string' ]; } return $result; } }