public function render() { $t = new Tag(); $dataToggle = "data-toggle"; $className = $this->getClass(); $iconPath = $this->getIcon(); $counterValue = $this->getCounter() != null ? $this->getCounter()->getValue() : null; /** @noinspection PhpMethodParametersCountMismatchInspection */ return $t->li(a::c1ass("dropdown {$className}-menu"), $t->a(a::href('#'), a::c1ass('dropdown-toggle'), a::$dataToggle('dropdown'), $this->prepareAriaFor($className), $this->prepareContentFor($className, $iconPath), $this->getCounter()), $t->ul(a::c1ass('dropdown-menu'), $this->makeAList($counterValue, $t))); }
public function index() { $t = new Tag(); echo "\n"; echo "\n"; echo $t->doctype($t->html(['ng-app' => 'nameApp'], [$t->head([$t->meta(['charset' => 'utf-8']), $t->title('Angular.js Example'), $t->script(['src' => 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.1/angular.min.js']), $t->script([' var nameApp = angular.module(\'nameApp\', []); nameApp.controller(\'NameCtrl\', function( $scope ) { $scope.names = [\'Lary\', \'Curly\', \'Moe\']; $scope.addName = function () { $scope.names.push($scope.enteredName); } //$scope.firstName = \'John\'; // //$scope.$watch(\'lastName\', function(newValue, oldValue) { // console.log(\'new value is \' + newValue); //}); // //setTimeout(function(){ // $scope.lastName = \'Smith\'; // $scope.$apply(); //}, 1000); });'])]), $t->body(['ng-controller' => 'NameCtrl'], [$t->ul([$t->li(['ng-repeat' => 'name in names track by $index'], ['{{name}}'])]), $t->form(['ng-submit' => 'addName()'], [$t->input(['type' => 'text', 'ng-model' => 'enteredName']), $t->input(['type' => 'submit', 'value' => 'add'])])])])); echo "\n"; }
public function render() { $t = new Tag(); /** @noinspection PhpMethodParametersCountMismatchInspection */ return $t->ul(a::c1ass('nav navbar-nav'), $this->menuElements); }