Example #1
0
 /**
  * Initialise form fields
  *
  * @SuppressWarnings(PHPMD.CamelCaseMethodName)
  */
 protected function _construct()
 {
     $this->addColumn('term_id', ['label' => '']);
     $this->addColumn('values', ['label' => __('Synonym terms')]);
     $this->_addAfter = false;
     $this->_addButtonLabel = __('Add Synonym');
     parent::_construct();
 }
Example #2
0
 /**
  * Initialise form fields
  *
  * @SuppressWarnings(PHPMD.CamelCaseMethodName)
  */
 protected function _construct()
 {
     $this->addColumn('term_id', ['label' => '']);
     $this->addColumn('reference_term', ['label' => __('Reference Term')]);
     $this->addColumn('values', ['label' => __('Expansion terms')]);
     $this->_addAfter = false;
     $this->_addButtonLabel = __('Add Expansion');
     parent::_construct();
 }
 /**
  *
  * @param \Nethgui\View\ViewInterface $view
  * @param callable $templateResolver
  * @param string $contentType
  * @param string $charset
  */
 public function __construct(\Nethgui\View\ViewInterface $view, $templateResolver, $contentType, $charset)
 {
     if (!is_callable($templateResolver)) {
         throw new \InvalidArgumentException(sprintf('%s: $templateResolver must be a valid callback function.', get_class($this)), 1322238847);
     }
     parent::__construct($view);
     $this->templateResolver = $templateResolver;
     $this->phpWrapper = new \Nethgui\Utility\PhpWrapper();
     $this->contentType = $contentType;
     $this->charset = $charset;
 }
 /**
  * @inheritdoc
  */
 public function render($params)
 {
     $params['classToTest'] = $params['class'];
     $params['class'] = $params['class'] . 'Test extends \\PHPUnit_Framework_TestCase';
     if (!isset($params['use'])) {
         $params['use'] = [];
     }
     $params['use'][] = $params['namespace'] . '\\' . $params['classToTest'];
     $testsNamespace = explode('\\', $params['namespace']);
     $testsNamespace[0] .= 'Test';
     $params['namespace'] = implode('\\', $testsNamespace);
     return parent::render($params);
 }
Example #5
0
 /**
  * Constructor
  *
  * @param   array  $messages
  * @return  void
  */
 public function __construct($messages = null)
 {
     parent::__construct($messages);
     $this->_logger = \Log::getRoot();
 }
Example #6
0
 /**
  * Draw the barcode in the rendering resource
  * @return mixed
  */
 public function draw()
 {
     parent::draw();
     $this->_resource->appendChild($this->_rootElement);
     return $this->_resource;
 }
Example #7
0
 protected function getPattern($type)
 {
     return parent::getPattern($type) ?: $this->types['default'];
 }
 /**
  * @inheritdoc
  */
 protected function getTextClassField($name, $type)
 {
     $type .= '|null';
     return parent::getTextClassField($name, $type);
 }