File modules/template_engine/components/html/component_user/UserComponent.class.php
Last commit: Wed Oct 14 22:36:29 2020 +0200 Jan Dankert Refactoring: Fixed the namespace in component classes, now the are able to be load by the standard autoloader.
1 <?php 2 3 namespace template_engine\components\html\component_user; 4 5 use template_engine\components\html\Component; 6 use template_engine\element\PHPBlockElement; 7 8 class UserComponent extends Component 9 { 10 public $user; 11 public $id; 12 13 public function createElement() 14 { 15 $user = new PHPBlockElement(); 16 $user->beforeBlock = $user->includeResource( 'user/component-user.php'); 17 $user->inBlock = 'component_user('.$user->value($this->user).');'; 18 19 return $user; 20 } 21 }
Downloadmodules/template_engine/components/html/component_user/UserComponent.class.php
History Wed, 14 Oct 2020 22:36:29 +0200 Jan Dankert Refactoring: Fixed the namespace in component classes, now the are able to be load by the standard autoloader. Wed, 14 Oct 2020 22:20:22 +0200 Jan Dankert Refactoring: Renamed component folders, because 'if' is no valid namespace fragment.