• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Gems_Loader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Gems_Loader的典型用法代码示例。如果您正苦于以下问题:PHP Gems_Loader类的具体用法?PHP Gems_Loader怎么用?PHP Gems_Loader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Gems_Loader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->db = \Zend_Db::factory('pdo_sqlite', array('dbname' => ':memory:'));
     \Zend_Registry::set('db', $this->db);
     $settings = new \Zend_Config_Ini(GEMS_ROOT_DIR . '/configs/application.example.ini', APPLICATION_ENV);
     $sa = $settings->toArray();
     $this->loader = new \Gems_Loader(\Zend_Registry::getInstance(), $sa['loaderDirs']);
     \Zend_Registry::set('loader', $this->loader);
     $this->tracker = $this->loader->getTracker();
     \Zend_Registry::set('tracker', $this->tracker);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:15,代码来源:TestAbstract.php


示例2: execute

 /**
  * Should handle execution of the task, taking as much (optional) parameters as needed
  *
  * The parameters should be optional and failing to provide them should be handled by
  * the task
  */
 public function execute($lineNr = null, $roundData = null)
 {
     $batch = $this->getBatch();
     $import = $batch->getVariable('import');
     if (!(isset($import['trackId']) && $import['trackId'])) {
         // Do nothing
         return;
     }
     // Only save when export code is known and set
     if (!isset($roundData['survey_export_code'], $import['surveyCodes'][$roundData['survey_export_code']])) {
         // Do nothing, no survey export code or no known export code
         return;
     }
     if (!$import['surveyCodes'][$roundData['survey_export_code']]) {
         // Export code not set to skip import of round
         return;
     }
     $fieldCodes = $import['fieldCodes'];
     $roundOrders = isset($import['roundOrders']) ? $import['roundOrders'] : array();
     $tracker = $this->loader->getTracker();
     $trackEngine = $tracker->getTrackEngine($import['trackId']);
     $model = $trackEngine->getRoundModel(true, 'create');
     $roundData['gro_id_track'] = $import['trackId'];
     $roundData['gro_id_survey'] = $import['surveyCodes'][$roundData['survey_export_code']];
     if (isset($roundData['valid_after']) && $roundData['valid_after']) {
         if (isset($roundOrders[$roundData['valid_after']]) && $roundOrders[$roundData['valid_after']]) {
             $roundData['gro_valid_after_id'] = $roundOrders[$roundData['valid_after']];
         } else {
             $batch->addTask('Tracker\\Import\\UpdateRoundValidTask', $lineNr, $roundData['gro_id_order'], $roundData['valid_after'], 'gro_valid_after_id');
         }
     }
     if (isset($roundData['gro_valid_after_source'], $fieldData['gro_valid_after_field'])) {
         switch ($roundData['gro_valid_after_source']) {
             case self::APPOINTMENT_TABLE:
             case self::RESPONDENT_TRACK_TABLE:
                 if (isset($fieldCodes[$fieldData['gro_valid_after_field']])) {
                     $fieldData['gro_valid_after_field'] = $fieldCodes[$fieldData['gro_valid_after_field']];
                 }
         }
     }
     if (isset($roundData['valid_for']) && $roundData['valid_for']) {
         if (isset($roundOrders[$roundData['valid_for']]) && $roundOrders[$roundData['valid_for']]) {
             $roundData['gro_valid_for_id'] = $roundOrders[$roundData['valid_for']];
         } else {
             $batch->addTask('Tracker\\Import\\UpdateRoundValidTask', $lineNr, $roundData['gro_id_order'], $roundData['valid_for'], 'gro_valid_for_id');
         }
     }
     if (isset($roundData['gro_valid_for_source'], $fieldData['gro_valid_for_field'])) {
         switch ($roundData['gro_valid_for_source']) {
             case self::APPOINTMENT_TABLE:
             case self::RESPONDENT_TRACK_TABLE:
                 if (isset($fieldCodes[$fieldData['gro_valid_for_field']])) {
                     $fieldData['gro_valid_for_field'] = $fieldCodes[$fieldData['gro_valid_for_field']];
                 }
         }
     }
     $roundData = $model->save($roundData);
     $import['rounds'][$lineNr]['gro_id_round'] = $roundData['gro_id_round'];
     $import['roundOrders'][$roundData['gro_id_order']] = $roundData['gro_id_round'];
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:66,代码来源:CreateTrackRoundImportTask.php


示例3: onFakeSubmit

 /**
  * Hook that allows actions when the form is submitted, but it was not the submit button that was checked
  *
  * When not rerouted, the form will be populated afterwards
  */
 protected function onFakeSubmit()
 {
     if (isset($this->formData['create_account']) && $this->formData['create_account']) {
         $mail = $this->loader->getMailLoader()->getMailer('staffPassword', $this->user->getUserId());
         $mail->setOrganizationFrom();
         if ($mail->setCreateAccountTemplate()) {
             $mail->send();
             $this->addMessage($this->_('Create account mail sent'));
             $this->setAfterSaveRoute();
         } else {
             $this->addMessage($this->_('No default Create Account mail template set in organization or project'));
         }
         return;
     }
     if (isset($this->formData['reset_password']) && $this->formData['reset_password']) {
         $mail = $this->loader->getMailLoader()->getMailer('staffPassword', $this->user->getUserId());
         $mail->setOrganizationFrom();
         if ($mail->setResetPasswordTemplate()) {
             $mail->send();
             $this->addMessage($this->_('Reset password mail sent'));
             $this->setAfterSaveRoute();
         } else {
             $this->addMessage($this->_('No default Reset Password mail template set in organization or project'));
         }
     }
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:31,代码来源:AdminPasswordResetSnippet.php


示例4: execute

 /**
  * Should handle execution of the task, taking as much (optional) parameters as needed
  *
  * The parameters should be optional and failing to provide them should be handled by
  * the task
  *
  * @param array $trackData Nested array of trackdata
  */
 public function execute($lineNr = null, $fieldData = null)
 {
     $batch = $this->getBatch();
     $import = $batch->getVariable('import');
     if (isset($fieldData['gtf_id_order']) && $fieldData['gtf_id_order']) {
         $import['fieldOrder'][$fieldData['gtf_id_order']] = false;
         if ($batch->hasVariable('trackEngine') && isset($fieldData['gtf_field_type']) && $fieldData['gtf_field_type']) {
             $trackEngine = $batch->getVariable('trackEngine');
             if ($trackEngine instanceof \Gems_Tracker_Engine_TrackEngineInterface) {
                 $fieldDef = $trackEngine->getFieldsDefinition();
                 $field = $fieldDef->getFieldByOrder($fieldData['gtf_id_order']);
                 if ($field instanceof FieldInterface) {
                     if ($field->getFieldType() != $fieldData['gtf_field_type']) {
                         $batch->addToCounter('import_errors');
                         $batch->addMessage(sprintf($this->_('Conflicting field types "%s" and "%s" for field orders %d specified on line %d.'), $field->getFieldType(), $fieldData['gtf_field_type'], $fieldData['gtf_id_order'], $lineNr));
                     }
                 }
             }
         }
     } else {
         $batch->addToCounter('import_errors');
         $batch->addMessage(sprintf($this->_('No gtf_id_order specified for field at line %d.'), $lineNr));
     }
     if (isset($fieldData['gtf_field_type']) && $fieldData['gtf_field_type']) {
         $model = $this->loader->getTracker()->createTrackClass('Model\\FieldMaintenanceModel');
         $fields = $model->getFieldTypes();
         if (!isset($fields[$fieldData['gtf_field_type']])) {
             $batch->addToCounter('import_errors');
             $batch->addMessage(sprintf($this->_('Unknown field type "%s" specified on line %d.'), $fieldData['gtf_field_type'], $lineNr));
         }
     } else {
         $batch->addToCounter('import_errors');
         $batch->addMessage(sprintf($this->_('No field type specified on line %d.'), $lineNr));
     }
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:43,代码来源:CheckTrackFieldImportTask.php


示例5: getAutoSearchElements

 /**
  * Returns a text element for autosearch. Can be overruled.
  *
  * The form / html elements to search on. Elements can be grouped by inserting null's between them.
  * That creates a distinct group of elements
  *
  * @param array $data The $form field values (can be usefull, but no need to set them)
  * @return array Of \Zend_Form_Element's or static tekst to add to the html or null for group breaks.
  */
 protected function getAutoSearchElements(array $data)
 {
     $elements = parent::getAutoSearchElements($data);
     $user = $this->loader->getCurrentUser();
     if ($user->hasPrivilege('pr.respondent.select-on-track')) {
         $tracks = $this->searchData['__active_tracks'];
         $masks['show_all'] = $this->_('(all)');
         $masks['show_without_track'] = $this->_('(no track)');
         if (count($tracks) > 1) {
             $masks['show_with_track'] = $this->_('(with track)');
         }
         if (count($tracks) > 1) {
             $elements[] = $this->_createSelectElement('gr2t_id_track', $masks + $tracks);
         } else {
             $element = $this->_createRadioElement('gr2t_id_track', $masks + $tracks);
             $element->setSeparator(' ');
             $elements[] = $element;
         }
         $lineBreak = true;
     } else {
         $lineBreak = false;
     }
     if ($user->hasPrivilege('pr.respondent.show-deleted')) {
         $elements[] = $this->_createCheckboxElement('grc_success', $this->_('Show active'));
     }
     if ($this->model->isMultiOrganization()) {
         $element = $this->_createSelectElement(\MUtil_Model::REQUEST_ID2, $user->getRespondentOrganizations(), $this->_('(all organizations)'));
         if ($lineBreak) {
             $element->setLabel($this->_('Organization'))->setAttrib('onchange', 'this.form.submit();');
             $elements[] = \MUtil_Html::create('br');
         }
         $elements[] = $element;
     }
     return $elements;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:44,代码来源:RespondentSearchSnippet.php


示例6: getAutoSearchElements

 /**
  * Returns a text element for autosearch. Can be overruled.
  *
  * The form / html elements to search on. Elements can be grouped by inserting null's between them.
  * That creates a distinct group of elements
  *
  * @param array $data The $form field values (can be usefull, but no need to set them)
  * @return array Of \Zend_Form_Element's or static tekst to add to the html or null for group breaks.
  */
 protected function getAutoSearchElements(array $data)
 {
     $dbLookup = $this->util->getDbLookup();
     $translated = $this->util->getTranslated();
     $noRound = array(self::NoRound => $this->_('No round description'));
     $empty = $translated->getEmptyDropdownArray();
     $rounds = $empty + $noRound + $dbLookup->getRoundsForExport();
     $surveys = $dbLookup->getSurveysForExport();
     $elements[] = $this->_createSelectElement('gto_id_survey', $surveys, $this->_('(select a survey)'));
     $elements[] = $this->_createSelectElement('gto_id_track', $this->util->getTrackData()->getAllTracks(), $this->_('(select a track)'));
     $elements[] = $this->_createSelectElement('gto_round_description', $rounds, $this->_('(select a round)'));
     $orgs = $this->loader->getCurrentUser()->getRespondentOrganizations();
     if (count($orgs) > 1) {
         $elements[] = $this->_createSelectElement('gto_id_organization', $orgs, $this->_('(all organizations)'));
     }
     $elements[] = null;
     $dates = array('gto_start_date' => $this->_('Track start'), 'gto_end_date' => $this->_('Track end'), 'gto_valid_from' => $this->_('Valid from'), 'gto_valid_until' => $this->_('Valid until'));
     // $dates = 'gto_valid_from';
     $this->_addPeriodSelectors($elements, $dates, 'gto_valid_from');
     $elements[] = null;
     $element = $this->form->createElement('checkbox', 'column_identifiers');
     $element->setLabel($this->_('Column Identifiers'));
     $element->setDescription($this->_('Prefix the column labels with an identifier. (A) Answers, (TF) Trackfields, (D) Description'));
     $elements[] = $element;
     $element = $this->form->createElement('checkbox', 'show_parent');
     $element->setLabel($this->_('Show parent'));
     $element->setDescription($this->_('Show the parent column even if it doesn\'t have answers'));
     $elements[] = $element;
     $element = $this->form->createElement('checkbox', 'prefix_child');
     $element->setLabel($this->_('Prefix child'));
     $element->setDescription($this->_('Prefix the child column labels with parent question label'));
     $elements[] = $element;
     $elements[] = null;
     return $elements;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:44,代码来源:SurveyAutosearchFormSnippet.php


示例7: afterRegistry

 /**
  * Called after the check that all required registry values
  * have been set correctly has run.
  *
  * @return void
  */
 public function afterRegistry()
 {
     parent::afterRegistry();
     if (!$this->user) {
         $this->user = $this->loader->getCurrentUser();
     }
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:13,代码来源:HiddenOrganizationModel.php


示例8: execute

 /**
  * Should handle execution of the task, taking as much (optional) parameters as needed
  *
  * The parameters should be optional and failing to provide them should be handled by
  * the task
  */
 public function execute($tokenData = null, $userId = null)
 {
     $batch = $this->getBatch();
     $tracker = $this->loader->getTracker();
     $batch->addToCounter('checkedTokens');
     $token = $tracker->getToken($tokenData);
     $wasAnswered = $token->isCompleted();
     if ($result = $token->checkTokenCompletion($userId)) {
         if ($result & \Gems_Tracker_Token::COMPLETION_DATACHANGE) {
             $i = $batch->addToCounter('resultDataChanges');
             $batch->setMessage('resultDataChanges', sprintf($this->_('Results and timing changed for %d tokens.'), $i));
             if ($wasAnswered) {
                 $action = 'token.data-changed';
                 $message = sprintf($this->_("Token '%s' data has changed."), $token->getTokenId());
             } else {
                 $action = 'token.answered';
                 $message = sprintf($this->_("Token '%s' was answered."), $token->getTokenId());
             }
             if (!$this->request instanceof \Zend_Controller_Request_Abstract) {
                 $this->request = \Zend_Controller_Front::getInstance()->getRequest();
             }
             $this->accesslog->logEntry($this->request, $action, true, $message, $token->getArrayCopy(), $token->getRespondentId());
         }
         if ($result & \Gems_Tracker_Token::COMPLETION_EVENTCHANGE) {
             $i = $batch->addToCounter('surveyCompletionChanges');
             $batch->setMessage('surveyCompletionChanges', sprintf($this->_('Answers changed by survey completion event for %d tokens.'), $i));
         }
     }
     if ($token->isCompleted()) {
         $batch->setTask('Tracker_ProcessTokenCompletion', 'tokproc-' . $token->getTokenId(), $tokenData, $userId);
     }
     $batch->setMessage('checkedTokens', sprintf($this->_('Checked %d tokens.'), $batch->getCounter('checkedTokens')));
     // Free memory
     $tracker->removeToken($token);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:41,代码来源:CheckTokenCompletion.php


示例9: execute

 /**
  * Should handle execution of the task, taking as much (optional) parameters as needed
  *
  * The parameters should be optional and failing to provide them should be handled by
  * the task
  *
  * @param array $trackData Nested array of trackdata
  */
 public function execute($formData = null)
 {
     $batch = $this->getBatch();
     $import = $batch->getVariable('import');
     $tracker = $this->loader->getTracker();
     $model = $tracker->getTrackModel();
     $model->applyFormatting(true, true);
     $trackData = $import['trackData'];
     $trackData['gtr_track_name'] = $formData['gtr_track_name'];
     $trackData['gtr_organizations'] = $formData['gtr_organizations'];
     if ($batch->hasVariable('trackEngine')) {
         $trackEngine = $batch->getVariable('trackEngine');
         if ($trackEngine instanceof \Gems_Tracker_Engine_TrackEngineInterface) {
             $trackData['gtr_id_track'] = $trackEngine->getTrackId();
         }
     }
     // \MUtil_Echo::track($trackData);
     if ($trackData['gtr_date_start'] && !$trackData['gtr_date_start'] instanceof \Zend_Date) {
         $trackData['gtr_date_start'] = new \MUtil_Date($trackData['gtr_date_start'], 'yyyy-MM-dd');
     }
     $output = $model->save($trackData);
     $import['trackId'] = $output['gtr_id_track'];
     $import['trackData']['gtr_id_track'] = $output['gtr_id_track'];
     $batch->addMessage($this->_('Merged track data'));
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:33,代码来源:MergeTrackImportTask.php


示例10: execute

 /**
  * Should handle execution of the task, taking as much (optional) parameters as needed
  *
  * The parameters should be optional and failing to provide them should be handled by
  * the task
  */
 public function execute($respTrackData = null, $userId = null)
 {
     $batch = $this->getBatch();
     $tracker = $this->loader->getTracker();
     $respTrack = $tracker->getRespondentTrack($respTrackData);
     $engine = $respTrack->getTrackEngine();
     $engine->checkRoundsFor($respTrack, $userId, $batch);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:14,代码来源:CheckTrackRounds.php


示例11: getFieldsTranslations

 /**
  * Get information on the field translations
  *
  * @return array of fields sourceName => targetName
  * @throws \MUtil_Model_ModelException
  */
 public function getFieldsTranslations()
 {
     if (!$this->_targetModel instanceof \MUtil_Model_ModelAbstract) {
         throw new \MUtil_Model_ModelTranslateException(sprintf('Called %s without a set target model.', __FUNCTION__));
     }
     $this->_targetModel->set('gto_id_token', 'label', $this->_('Token'), 'import_descr', $this->loader->getTracker()->getTokenLibrary()->getFormat(), 'required', true, 'order', 2);
     return array('token' => 'gto_id_token') + parent::getFieldsTranslations();
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:14,代码来源:TokenAnswerTranslator.php


示例12: createModel

 /**
  * Creates the model
  *
  * @return \MUtil_Model_ModelAbstract
  */
 protected function createModel()
 {
     if (!$this->model instanceof LogModel) {
         $this->model = $this->loader->getModels()->createLogModel();
         $this->model->applyDetailSettings();
     }
     return $this->model;
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:13,代码来源:LogShowSnippet.php


示例13: execute

 /**
  * Should handle execution of the task, taking as much (optional) parameters as needed
  *
  * The parameters should be optional and failing to provide them should be handled by
  * the task
  */
 public function execute($surveyId = null, $questionId = null, $order = null)
 {
     $batch = $this->getBatch();
     $survey = $this->loader->getTracker()->getSurvey($surveyId);
     // Now save the questions
     $answerModel = $survey->getAnswerModel('en');
     $questionModel = new \MUtil_Model_TableModel('gems__survey_questions');
     \Gems_Model::setChangeFieldsByPrefix($questionModel, 'gsq');
     $label = $answerModel->get($questionId, 'label');
     /*
             if ($label instanceof \MUtil_Html_HtmlInterface) {
                 $label = $label->render($this->view);
             }
             // */
     $question['gsq_id_survey'] = $surveyId;
     $question['gsq_name'] = $questionId;
     $question['gsq_name_parent'] = $answerModel->get($questionId, 'parent_question');
     $question['gsq_order'] = $order;
     $question['gsq_type'] = $answerModel->getWithDefault($questionId, 'type', \MUtil_Model::TYPE_STRING);
     $question['gsq_class'] = $answerModel->get($questionId, 'thClass');
     $question['gsq_group'] = $answerModel->get($questionId, 'group');
     $question['gsq_label'] = $label;
     $question['gsq_description'] = $answerModel->get($questionId, 'description');
     // \MUtil_Echo::track($question);
     try {
         $questionModel->save($question);
     } catch (\Exception $e) {
         $batch->addMessage(sprintf($this->_('Save failed for survey %s, question %s: %s'), $survey->getName(), $questionId, $e->getMessage()));
     }
     $batch->addToCounter('checkedQuestions');
     if ($questionModel->getChanged()) {
         $batch->addToCounter('changedQuestions');
     }
     $batch->setMessage('questionschanged', sprintf($this->_('%d of %d questions changed.'), $batch->getCounter('changedQuestions'), $batch->getCounter('checkedQuestions')));
     $options = $answerModel->get($questionId, 'multiOptions');
     if ($options) {
         $optionModel = new \MUtil_Model_TableModel('gems__survey_question_options');
         \Gems_Model::setChangeFieldsByPrefix($optionModel, 'gsqo');
         $option['gsqo_id_survey'] = $surveyId;
         $option['gsqo_name'] = $questionId;
         $i = 0;
         // \MUtil_Echo::track($options);
         foreach ($options as $key => $label) {
             $option['gsqo_order'] = $i;
             $option['gsqo_key'] = $key;
             $option['gsqo_label'] = $label;
             try {
                 $optionModel->save($option);
             } catch (\Exception $e) {
                 $batch->addMessage(sprintf($this->_('Save failed for survey %s, question %s, option "%s" => "%s": %s'), $survey->getName(), $questionId, $key, $label, $e->getMessage()));
             }
             $i++;
         }
         $batch->addToCounter('checkedOptions', count($options));
         $batch->addToCounter('changedOptions', $optionModel->getChanged());
         $batch->setMessage('optionschanged', sprintf($this->_('%d of %d options changed.'), $batch->getCounter('changedOptions'), $batch->getCounter('checkedOptions')));
     }
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:64,代码来源:RefreshQuestion.php


示例14: getHtmlOutput

 /**
  * Create the snippets content
  *
  * This is a stub function either override getHtmlOutput() or override render()
  *
  * @param \Zend_View_Abstract $view Just in case it is needed here
  * @return \MUtil_Html_HtmlInterface Something that can be rendered
  */
 public function getHtmlOutput(\Zend_View_Abstract $view)
 {
     $messages = false;
     if ($this->wasAnswered) {
         $this->currentToken = $this->token->getNextUnansweredToken();
     } else {
         $validator = $this->loader->getTracker()->getTokenValidator();
         if ($validator->isValid($this->token->getTokenId())) {
             $this->currentToken = $this->token;
         } else {
             $messages = $validator->getMessages();
             $this->currentToken = $this->token->getNextUnansweredToken();
         }
     }
     if ($this->currentToken instanceof \Gems_Tracker_Token) {
         $href = $this->getTokenHref($this->currentToken);
         $url = $href->render($this->view);
         // Redirect at once
         header('Location: ' . $url);
         exit;
     }
     // After the header() so that the patient does not see the messages after answering surveys
     if ($messages) {
         $this->addMessage($messages);
     }
     $org = $this->token->getOrganization();
     $html = $this->getHtmlSequence();
     $html->h3($this->_('Token'));
     $html->pInfo(sprintf($this->_('Thank you %s,'), $this->token->getRespondentName()));
     if ($welcome = $org->getWelcome()) {
         $html->pInfo()->raw(\MUtil_Markup::render($this->_($welcome), 'Bbcode', 'Html'));
     }
     $p = $html->pInfo()->spaced();
     if ($this->wasAnswered) {
         $p->append($this->_('Thanks for answering our questions.'));
     } elseif (!$this->isValid) {
         if ($this->token->isExpired()) {
             $this->addMessage($this->_('This survey has expired. You can no longer answer it.'));
         } else {
             $this->addMessage($this->_('This survey is no longer valid.'));
         }
     }
     $p->append($this->_('We have no further questions for you at the moment.'));
     $p->append($this->_('We appreciate your cooperation very much.'));
     if ($sig = $org->getSignature()) {
         $html->pInfo()->raw(\MUtil_Markup::render($this->_($sig), 'Bbcode', 'Html'));
     }
     /*
             $html->br();
     
             $href = array($this->request->getActionKey() => 'index', \MUtil_Model::REQUEST_ID => null);
             $buttonDiv = $html->buttonDiv(array('class' => 'centerAlign'));
             $buttonDiv->actionLink($href, $this->_('OK'));
             // */
     return $html;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:64,代码来源:RedirectUntilGoodbyeSnippet.php


示例15: afterRegistry

 public function afterRegistry()
 {
     $this->user = $this->loader->getUserLoader()->getUserByStaffId($this->staffId);
     parent::afterRegistry();
     $this->user = $this->loader->getUserLoader()->getUserByStaffId($this->staffId);
     $mailFields = $this->user->getMailFields();
     $this->addMailFields($mailFields);
     $this->addTo($this->user->getEmailAddress(), $this->user->getFullName());
     $this->setLanguage($this->user->getLocale());
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:10,代码来源:StaffMailer.php


示例16: createModel

 /**
  * Creates a model for getModel(). Called only for each new $action.
  *
  * The parameters allow you to easily adapt the model to the current action. The $detailed
  * parameter was added, because the most common use of action is a split between detailed
  * and summarized actions.
  *
  * @param boolean $detailed True when the current action is not in $summarizedActions.
  * @param string $action The current action.
  * @return \MUtil_Model_ModelAbstract
  */
 protected function createModel($detailed, $action)
 {
     $model = $this->loader->getModels()->createLogModel();
     if ($detailed) {
         $model->applyDetailSettings();
     } else {
         $model->applyBrowseSettings();
     }
     return $model;
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:21,代码来源:LogAction.php


示例17: createModel

 /**
  * Creates the model
  *
  * @return \MUtil_Model_ModelAbstract
  */
 protected function createModel()
 {
     if ($this->model instanceof \Gems_Model_StaffModel) {
         $model = $this->model;
     } else {
         $model = $this->loader->getModels()->getStaffModel();
         $model->applyBrowseSettings();
     }
     return $model;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:15,代码来源:StaffTableSnippet.php


示例18: afterRegistry

 public function afterRegistry()
 {
     if (!$this->respondent) {
         $this->respondent = $this->loader->getRespondent($this->patientId, $this->organizationId);
     }
     parent::afterRegistry();
     if ($this->respondent) {
         $this->addTo($this->respondent->getEmailAddress(), $this->respondent->getName());
         $this->setLanguage($this->respondent->getLanguage());
     }
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:11,代码来源:RespondentMailer.php


示例19: getAutoSearchElements

 /**
  * Returns a text element for autosearch. Can be overruled.
  *
  * The form / html elements to search on. Elements can be grouped by inserting null's between them.
  * That creates a distinct group of elements
  *
  * @param array $data The $form field values (can be usefull, but no need to set them)
  * @return array Of \Zend_Form_Element's or static tekst to add to the html or null for group breaks.
  */
 protected function getAutoSearchElements(array $data)
 {
     $elements = parent::getAutoSearchElements($data);
     $this->_addPeriodSelectors($elements, 'gla_created');
     $elements[] = null;
     $elements[] = $this->_('Specific action');
     $sql = "SELECT gls_id_action, gls_name\n                    FROM gems__log_setup\n                    WHERE gls_when_no_user = 1 OR gls_on_action = 1 OR gls_on_change = 1 OR gls_on_post = 1\n                    ORDER BY gls_name";
     $elements[] = $this->_createSelectElement('gla_action', $sql, $this->_('(any action)'));
     $elements[] = $this->_createSelectElement('gla_organization', $this->loader->getCurrentUser()->getAllowedOrganizations(), $this->_('(all organizations)'));
     return $elements;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:20,代码来源:LogSearchSnippet.php


示例20: getImportOnlyBatch

 /**
  *
  * @param \MUtil_Task_TaskBatch $batch Optional batch with different source etc..
  * @return \MUtil_Task_TaskBatch
  */
 public function getImportOnlyBatch(\MUtil_Task_TaskBatch $batch = null)
 {
     if (!$this->_importBatch instanceof \MUtil_Task_TaskBatch) {
         $batch = $this->loader->getTaskRunnerBatch(__CLASS__ . '_import_' . basename($this->sourceModel->getName()) . '_' . __FUNCTION__);
         $batch->setVariable('targetModel', $this->getTargetModel());
         $this->_importBatch = $batch;
     } else {
         $batch = $this->_importBatch;
     }
     return parent::getImportOnlyBatch($batch);
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:16,代码来源:Importer.php



注:本文中的Gems_Loader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Gems_Util类代码示例发布时间:2022-05-23
下一篇:
PHP GearmanWorker类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap