Exemplo n.º 1
0
 public function compileBuilderFuntcionName(Twig_Compiler $compiler)
 {
     if ($this->getNode('values')->hasNode('withValidation') && $this->getNodeValue('withValidation')) {
         $compiler->raw('->ajaxSubmit()');
     } else {
         parent::compileBuilderFuntcionName($compiler);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 6
0
 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');
     }
 }
Exemplo n.º 8
0
 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);
     }
 }
Exemplo n.º 9
0
 public function __construct($names, $values, $lineno, $tag = null)
 {
     parent::__construct($names, $values, $lineno, $tag);
     $this->setOnlyHTML(true);
 }
Exemplo 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);
     }
 }