function __construct($activeElement = null) { Assert::isScalarOrNull($activeElement); $this->activeElement = $activeElement; parent::__construct('parts/top-menu'); }
/** * @param string $viewName name of the view located at $app_dir/views/<viewName>.view.php */ function __construct($viewName) { Assert::isScalar($viewName); $this->viewName = $viewName; parent::__construct(APP_ROOT . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . $viewName . self::VIEW_EXTENSION); }