Example #1
0
 /**
  * @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);
 }
Example #2
0
 /**
  * @covers Context::getUIManager
  */
 public function testGetUIManager()
 {
     $actual = $this->ctx->getUIManager();
     $this->assertInstanceOf("FSUIManager", $actual);
 }
Example #3
0
 /**
  * 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);
 }
Example #4
0
 protected function newPage(ITranslator $translator = null)
 {
     global $ui;
     $ui = $this->ctx->getUIManager();
     return $ui->newPage($translator);
 }