addBlock($key, function () use ($position, $opts) { $class = $opts['class'] ?? Banner::class; return new $class(['bannerPosition' => $position]); }, $callback); if (! empty($this->rotationBlocksKey)) { $this->rotateBlock($key, true, ['checked' => false]); } } /** * Get banner block * @param string $key block key * @return Banner|mixed */ public function getBanner(string $key) { return $this->getBlock($key); } }