コード例 #1
0
 /**
  * Umožňuje měnit parametry služeb
  *
  * @param IEService $service
  * @param IEHost    $host    ObjektHostu
  */
 public function __construct($service, $host)
 {
     parent::__construct();
     $this->service = $service;
     $this->host = $host;
     $this->command = new IECommand();
     $this->command->setmyKeyColumn($this->command->nameColumn);
     $checkLocal = $this->service->getDataValue('check_command');
     //        $checkRemote = $this->service->getDataValue('check_command-remote');
     if (isset($checkLocal)) {
         $this->command->loadFromMySQL($checkLocal);
     }
     $configurator = $this->service->getDataValue('configurator');
     if ($configurator) {
         $module = 'modules/' . $configurator . '.inc.php';
         if (file_exists($module)) {
             require_once $module;
             $this->configurator = $this->addItem(new $configurator($this));
         } else {
             $this->addStatusMessage(sprintf(_('Modul %s nebyl nalezen'), $module), 'error');
         }
     } else {
         $this->configurator = $this->addItem(new IEServiceConfigurator($this));
     }
 }
コード例 #2
0
 /**
  * Nastavuje titulek
  *
  * @param string $pageTitle
  */
 public function __construct($pageTitle = null)
 {
     parent::__construct('header');
     if (!is_null($pageTitle)) {
         EaseShared::webPage()->setPageTitle($pageTitle);
     }
 }
コード例 #3
0
 /**
  * Potvrzovací dialog Twitter Bootstrapu
  *
  * @param string $name
  * @param string $url
  * @param string $title
  * @param mixed  $content
  * @param array  $properties
  */
 function __construct($name = null, $url, $title, $content = null, $properties = null)
 {
     if (isset($properties['class'])) {
         $properties['class'] .= ' modal fade';
     } else {
         $properties['class'] = 'modal fade';
     }
     parent::__construct($name, null, $properties);
     $modalDialog = $this->addItem(new EaseHtmlDivTag(null, null, array('class' => 'modal-dialog')));
     $modalContent = $modalDialog->addItem(new EaseHtmlDivTag(null, null, array('class' => 'modal-content')));
     $modalContent->addItem(new EaseHtmlDivTag(null, array(new EaseHtmlButtonTag('<span aria-hidden="true">&times;</span>', array('class' => 'close', 'data-dismiss' => 'modal', 'aria-label' => _('Zavřít'))), new EaseHtmlH4Tag($title, array('class' => 'modal-title'))), array('class' => 'modal-header')));
     $modalContent->addItem(new EaseHtmlDivTag(null, $content, array('class' => 'modal-body')));
     $modalContent->addItem(new EaseHtmlDivTag(null, array(new EaseHtmlButtonTag(_('Ne'), array('class' => "btn btn-default", 'data-dismiss' => "modal")), new EaseTWBLinkButton($url, _('Ano'), 'danger')), array('class' => 'modal-footer')));
 }
コード例 #4
0
 /**
  * Umožňuje měnit parametry služeb
  *
  * @param IEContact $contact
  * @param IEHost    $host    ObjektHostu
  */
 public function __construct($contact)
 {
     parent::__construct();
     $this->subcontactTypes = array_combine($this->subcontactTypes, $this->subcontactTypes);
     $this->contact = $contact;
     $this->addItem(new EaseHtmlDivTag(null, _('Založeno') . ': ' . $this->contact->getDataValue('DatCreate')));
     $oPage = EaseShared::webPage();
     if ($oPage->isPosted()) {
         $oldId = $this->contact->getId();
         $contactType = $oPage->getRequestValue('contact');
         $contactData = $oPage->getRequestValue('cnt');
         if (isset($contactType) && strlen($contactData)) {
             if ($this->contact->fork(array($contactType => $contactData))) {
                 $this->addStatusMessage(sprintf(_('Kontaktní údaj %s %s byl přidán'), $contactType, $contactData), 'success');
                 $this->cnt = '';
             } else {
                 $this->addStatusMessage(sprintf(_('Kontaktní údaj %s %s nebyl přidán'), $contactType, $contactData), 'error');
                 $this->cnt = EaseShared::webPage()->getRequestValue('cnt');
             }
         }
         $this->contact->loadFromMySQL($oldId);
     }
 }
コード例 #5
0
 public function __construct($id = null)
 {
     parent::__construct($id, null, array('class' => 'loader', 'data-initialize' => 'loader'));
 }
コード例 #6
0
 /**
  * Vytvoří hlavní menu
  */
 public function __construct()
 {
     parent::__construct('MainMenu');
 }