Created
August 22, 2017 22:56
-
-
Save cyberlex404/0f1288a5a60296de5b9e3b41e9742339 to your computer and use it in GitHub Desktop.
Administration page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Drupal\home_holiday\Controller; | |
| use Drupal\Core\Controller\ControllerBase; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| use Drupal\system\SystemManager; | |
| /** | |
| * Class HolidayStructure. | |
| */ | |
| class HolidayStructure extends ControllerBase { | |
| /** | |
| * Drupal\system\SystemManager definition. | |
| * | |
| * @var \Drupal\system\SystemManager | |
| */ | |
| protected $systemManager; | |
| /** | |
| * Constructs a new HolidayStructure object. | |
| */ | |
| public function __construct(SystemManager $system_manager) { | |
| $this->systemManager = $system_manager; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public static function create(ContainerInterface $container) { | |
| return new static( | |
| $container->get('system.manager') | |
| ); | |
| } | |
| /** | |
| * Hello. | |
| * | |
| * @return array | |
| * | |
| */ | |
| public function structure() { | |
| return $this->systemManager->getBlockContents(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment