public function compileBuilderFuntcionName(Twig_Compiler $compiler)
 {
     if ($this->getNode('values')->hasNode('withValidation') && $this->getNodeValue('withValidation')) {
         $compiler->raw('->ajaxSubmit()');
     } else {
         parent::compileBuilderFuntcionName($compiler);
     }
 }
 public function compileEndWidget(Twig_Compiler $compiler)
 {
     if (!$this->getNode('values')->hasNode('region')) {
         parent::compileEndWidget($compiler);
     } else {
         $compiler->write(sprintf('echo %s->endLayout();', $this->getVarName()));
     }
 }
 public function compileWidget(Twig_Compiler $compiler)
 {
     if ($this->getNode('values')->hasNode('inline')) {
         if ($this->getNodeValue('inline')) {
             $this->setInline(true);
         }
     }
     parent::compileWidget($compiler);
 }
 public function compileEndWidget(Twig_Compiler $compiler)
 {
     if ($this->getNode('values')->hasNode('step')) {
         $compiler->write(sprintf('echo %s->endStep();', $this->getVarName()));
         $compiler->raw("\n");
     } else {
         parent::compileEndWidget($compiler);
     }
 }
 public function compileBuilderFuntcionName(Twig_Compiler $compiler)
 {
     if ($this->isTimepicker()) {
         $compiler->raw('->timepicker()');
     } elseif ($this->isRangepicker()) {
         $compiler->raw('->daterangepicker()');
     } else {
         parent::compileBuilderFuntcionName($compiler);
     }
 }
 public function compileBuilderFuntcionName(Twig_Compiler $compiler)
 {
     if ($this->getNode('values')->hasNode('qwerty') && $this->getNodeValue('qwerty')) {
         $compiler->raw('->qwerty()');
     } elseif ($this->getNode('values')->hasNode('alphabetic') && $this->getNodeValue('alphabetic')) {
         $compiler->raw('->alphabetic()');
     } else {
         parent::compileBuilderFuntcionName($compiler);
     }
 }
 public function __construct($names, $values, $lineno, $tag = null)
 {
     parent::__construct($names, $values, $lineno, $tag);
     $this->setOnlyJsS(true);
     $this->setExec(false);
     if ($this->getNode('values')->hasNode('name')) {
         $this->getNode('values')->setNode('widgetVar', $this->getNode('values')->getNode('name'));
         $this->getNode('values')->removeAttribute('name');
     }
 }
 public function __construct($names, $values, $lineno, $tag = null)
 {
     parent::__construct($names, $values, $lineno, $tag);
     $this->setOnlyJsS(true);
     $this->setIsPlugin(true);
     if ($this->getNode('values')->hasNode('for')) {
         $this->setInSelector(true);
     } else {
         $this->setInSelector(false);
     }
 }
Esempio n. 9
0
 public function __construct($names, $values, $lineno, $tag = null)
 {
     parent::__construct($names, $values, $lineno, $tag);
     $this->setOnlyHTML(true);
 }
Esempio n. 10
0
 public function compileBuilder(Twig_Compiler $compiler)
 {
     if ($this->isButtonset()) {
         $compiler->write(sprintf('echo %s->buildButtonset()', $this->getVarName()));
         $compiler->indent();
         $compiler->indent();
         $compiler->write("\n");
         $compiler->write('->in(');
         $this->compileSelector($compiler);
         $compiler->raw(')');
         $compiler->write("\n");
         $compiler->write(sprintf("->addOptions(%s)\n", $this->getOptionsVarName()));
     } else {
         parent::compileBuilder($compiler);
     }
 }