<?php
namespace App\Form\Input; class FormulaTextarea extends \Engine\Form\Input\Textarea { protected $class = "formulaTextarea"; protected $pivot=null; public function __construct($label=null, $name=null, $value=null) { parent::__construct($label, $name, $value); } public function setPivot($pivot) { $this->pivot = $pivot; return $this; } public function getUrl() { return \Engine\Mvc\Dispatcher::getInstance()->getAppUrl('Modules/RemoteData/AutocompleteFormula', '', ['pivot'=>$this->pivot] ); } protected function getTemplateParams($templateClass = null, $parentElement = null) { $params = parent::getTemplateParams($templateClass, $parentElement); $params['pivot'] = $this->pivot; $params['url'] = $this->getUrl(); return $params; } } 