generated from mirzaev/pot
	transition from site-mirzaev
This commit is contained in:
		
							
								
								
									
										59
									
								
								mirzaev/site/account/system/controllers/graph_controller.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								mirzaev/site/account/system/controllers/graph_controller.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| <?php | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace mirzaev\site\mirzaev\controllers; | ||||
|  | ||||
| // Файлы проекта | ||||
| use mirzaev\site\mirzaev\controllers\core; | ||||
|  | ||||
| /** | ||||
|  * Контроллер графика | ||||
|  * | ||||
|  * @package mirzaev\site\mirzaev\controllers | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  */ | ||||
| final class graph_controller extends core | ||||
| { | ||||
|     /** | ||||
|      * Страница с графиком | ||||
|      * | ||||
|      * Можно использовать совместно с элементом <iframe> для изоляции | ||||
|      * содержимого бегущей строки от поисковых роботов | ||||
|      * | ||||
|      * @param array $parameters | ||||
|      */ | ||||
|     public function index(array $parameters = []): ?string | ||||
|     { | ||||
|         // Инициализация элементов для генерации в головном элементе | ||||
|         $this->variables['head'] = [ | ||||
|             'title' => 'Бегущая строка', | ||||
|             'metas' => [ | ||||
|                 [ | ||||
|                     'attributes' => [ | ||||
|                         'name' => 'robots', | ||||
|                         'content' => 'nofollow' | ||||
|                     ] | ||||
|                 ] | ||||
|             ] | ||||
|         ]; | ||||
|  | ||||
|         // Инициализация бегущей строки | ||||
|         $this->variables['graph'] = [ | ||||
|             'id' => $this->variables['request']['id'] ?? 'graph' | ||||
|         ]; | ||||
|  | ||||
|         // Инициализация аттрибутов бегущей строки | ||||
|         $this->variables['graph']['attributes'] = [ | ||||
|  | ||||
|         ]; | ||||
|  | ||||
|         // Инициализация элементов бегущей строки | ||||
|         $this->variables['graph']['elements'] = [ | ||||
|         ]; | ||||
|  | ||||
|         // Генерация представления | ||||
|         return $this->view->render(DIRECTORY_SEPARATOR . 'graph' . DIRECTORY_SEPARATOR . 'index.html', $this->variables); | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user