Ejemplo n.º 1
0
 public function getAdminFormValue()
 {
     $view = new \Faid\View\View(__DIR__ . '/Views/inputAdminForm.tpl');
     $view->set('name', $this->szFieldName);
     $view->set('value', $this->aValue);
     $view->set('title', !empty($this->fieldInfo['title']) ? $this->fieldInfo['title'] : $this->szFieldName);
     $view->set('formEdit', !empty($this->fieldInfo['form_edit']) ? $this->fieldInfo['form_edit'] : '');
     if (!empty($this->fieldInfo['required'])) {
         $view->set('requiredField', true);
     }
     return $view->render();
 }
Ejemplo n.º 2
0
 public function oauthResults()
 {
     try {
         $this->api->authCallback();
         $response = $this->api->getCurrentSession();
     } catch (\Exception $e) {
         $response['error'] = $e->getMessage();
     }
     $view = new \Faid\View\View(__DIR__ . '/response.tpl');
     $view->set('response', $response);
     $view->set('type', $this->type);
     print $view->render();
     die;
 }
Ejemplo n.º 3
0
 public function main()
 {
     $fieldInfo = \Extasy\Schedule\Job::getFieldsInfo();
     $begin = [self::Title => '#'];
     $this->outputHeader($begin, self::Title);
     $view = new \Faid\View\View(__DIR__ . '/dashboard.tpl');
     $view->set('statuses', $fieldInfo['fields']['status']['values']);
     print $view->render();
     $this->outputFooter();
     $this->output();
 }
Ejemplo n.º 4
0
 /**
  * @desc Показывает формовый элемент
  * @return
  */
 function getFormValue()
 {
     if (is_array($this->fieldInfo) && isset($this->fieldInfo['disabled']) && !empty($this->aValue)) {
         return $this->getViewValue();
     }
     $view = new \Faid\View\View(__DIR__ . '/Views/textAdminForm.tpl');
     $view->set('name', $this->szFieldName);
     $view->set('value', $this->aValue);
     $view->set('style', !empty($this->fieldInfo['style']) ? $this->fieldInfo['style'] : '');
     $view->set('class', !empty($this->fieldInfo['class']) ? $this->fieldInfo['class'] : '');
     $view->set('title', !empty($this->fieldInfo['title']) ? $this->fieldInfo['title'] : $this->szFieldName);
     $view->set('formEdit', !empty($this->fieldInfo['form_edit']) ? $this->fieldInfo['form_edit'] : '');
     if (!empty($this->fieldInfo['required'])) {
         $view->set('requiredField', true);
     }
     return $view->render();
 }
Ejemplo n.º 5
0
 public function getAdminFormValue()
 {
     $map = [];
     foreach ($this->aValue as $network => $token) {
         $network = Network::getByName($network);
         $map[] = ['title' => $network->title->getValue(), 'value' => $token];
     }
     $view = new \Faid\View\View(__DIR__ . DIRECTORY_SEPARATOR . 'social_network.tpl');
     $view->set('map', $map);
     return $view->render();
 }