/** * @param Context $ctx */ public function __construct($ctx) { $this->ui = $ctx->getUIManager(); $this->form = $ctx->getForm(); $this->format = $ctx->getUIManager()->getFormatter(); $this->sEcho = $ctx->getRequest()->getLong('sEcho'); $this->pagingInfo = new PagingInfo(); $this->init($ctx); }
/** * @covers Context::getUIManager */ public function testGetUIManager() { $actual = $this->ctx->getUIManager(); $this->assertInstanceOf("FSUIManager", $actual); }
/** * Add an error associated with the given field name. The message is defined * by the given error tag and will be defined in the form. * * @param Context $ctx * @param String $fieldName the name of the field * @param String $errorTag the tag identifying the error message */ protected function addFieldErrorTag($ctx, $fieldName, $errorTag) { $form = $ctx->getForm(); $form->addFieldError($fieldName, $errorTag); $ctx->getUIManager()->getErrorManager()->addError($errorTag); }
protected function newPage(ITranslator $translator = null) { global $ui; $ui = $this->ctx->getUIManager(); return $ui->newPage($translator); }