当前位置: 首页>>代码示例>>PHP>>正文


PHP trlKwf函数代码示例

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


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

示例1: preDispatch

 public function preDispatch()
 {
     $this->getHelper('viewRenderer')->setNoController(true);
     $this->getHelper('viewRenderer')->setViewScriptPathNoControllerSpec('user/:action.:suffix');
     if (!$this->_getParam('user') && $this->getRequest()->getActionName() != 'error') {
         $code = $this->_getParam('code');
         if (!preg_match('#^(.*)-(\\w*)$#', $code, $m)) {
             $this->getRequest()->setParam('errorMessage', trlKwf("Activation code is invalid. Maybe the URL wasn't copied completely?"));
             $this->forward('error');
         } else {
             $userId = $m[1];
             $code = $m[2];
             $userModel = Kwf_Registry::get('userModel');
             $user = $userModel->getRow($userId);
             $this->getRequest()->setParam('user', $user);
             if (!$user) {
                 $this->getRequest()->setParam('errorMessage', trlKwf("Activation code is invalid. Maybe the URL wasn't copied completely?"));
                 $this->forward('error');
             } else {
                 if (!$user->validateActivationToken($code) && $user->isActivated()) {
                     $this->getRequest()->setParam('errorMessage', trlKwf("This account has already been activated."));
                     $this->forward('error');
                 } else {
                     if (!$user->validateActivationToken($code)) {
                         $this->getRequest()->setParam('errorMessage', trlKwf("Activation code is invalid. Maybe your account has already been activated, the URL was not copied completely, or the password has already been set?"));
                         $this->forward('error');
                     }
                 }
             }
         }
     }
     $this->view->dep = Kwf_Assets_Package_Default::getAdminMainInstance();
     parent::preDispatch();
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:34,代码来源:BackendActivateController.php

示例2: __construct

 public function __construct($name, $class, $id = null)
 {
     parent::__construct($name, $class, $id);
     $this->setXtype('Kwc.Basic.DownloadTag');
     $this->fields->add(new Kwf_Form_Field_File('File', trlKwf('File')))->setDirectory('BasicDownloadTag')->setAllowOnlyImages(false)->setAllowBlank(false);
     $this->fields->add(new Kwf_Form_Field_TextField('filename', trlKwf('Filename')))->setVtype('alphanum')->setAutoFillWithFilename('filename')->setHelpText(trlKwf('Enter the name (without file extension), the file should get when downloading it.'))->setWidth(300)->setAllowBlank(false);
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例3: _getRecipient

 protected function _getRecipient()
 {
     $rs = $this->_getMailComponent()->getRecipientSources();
     $recipientId = $this->_getParam('recipientId');
     if (!$recipientId) {
         $component = Kwf_Component_Data_Root::getInstance()->getComponentById($this->_getParam('componentId'), array('ignoreVisible' => true));
         $source = reset($rs);
         $model = Kwf_Model_Abstract::getInstance($source['model']);
         $select = $model->select();
         if ($model->hasColumn('newsletter_component_id')) {
             $select->whereEquals('newsletter_component_id', $component->parent->componentId);
         }
         if (isset($source['select'])) {
             $select->merge($source['select']);
         }
         $row = $model->getRow($select);
         if (!$row) {
             throw new Kwf_Exception_Client(trlKwf('Preview cannot be shown because it needs at least one recipient of this newsletter'));
         }
         $recipientId = $row->id;
     }
     $select = new Kwf_Model_Select();
     $select->whereEquals('id', $recipientId);
     $subscribeModelKey = $this->_getParam('subscribeModelKey');
     if (!$subscribeModelKey) {
         $subscribeModelKey = current(array_keys($rs));
     }
     $model = $rs[$subscribeModelKey]['model'];
     $row = Kwf_Model_Abstract::getInstance($model)->getRow($select);
     return $row;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:31,代码来源:PreviewController.php

示例4: _getErrorMessage

 protected function _getErrorMessage($type)
 {
     if ($type == Kwc_User_Activate_Form_Component::ERROR_ALREADY_ACTIVATED || $type == Kwc_User_Activate_Form_Component::ERROR_CODE_WRONG) {
         return trlKwf('Maybe you have already set your password, or the link was not copied correct out of the email.');
     }
     return parent::_getErrorMessage($type);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例5: _beforeDelete

 protected function _beforeDelete(Kwf_Model_Row_Interface $row)
 {
     parent::_beforeDelete($row);
     if ($this->_model->countRows($this->_getSelect()) <= $row->total_columns) {
         throw new Kwf_Exception_Client(trlKwf('It is not possible to delete a column in first row'));
     }
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:Controller.php

示例6: _showForm

 protected function _showForm()
 {
     $this->view->formName = $this->_form->getName();
     $this->view->method = 'post';
     $this->view->submitButtonText = trlKwf('Submit');
     $this->view->action = '';
     $values = $this->_form->load(null, $this->_getParam('formPostData'));
     $this->view->form = $this->_form->getTemplateVars($values, '', $this->view->formName . '_');
     $errors = $this->_getParam('formErrors');
     if (!$errors) {
         $errors = array();
     }
     $dec = new Kwc_Form_Decorator_Label();
     $this->view->form = $dec->processItem($this->view->form, $errors);
     $this->view->errors = Kwf_Form::formatValidationErrors($errors);
     $this->view->errorsHtml = '';
     if ($this->view->errors) {
         $this->view->errorsHtml .= '<div class="kwfUp-webStandard kwfUp-kwcFormError kwfUp-webFormError">';
         $this->view->errorsHtml .= '<p class="error">' . trlKwf('An error has occurred') . ':</p>';
         $this->view->errorsHtml .= '<ul>';
         foreach ($this->view->errors as $error) {
             $this->view->errorsHtml .= '<li>' . htmlspecialchars($error) . '</li>';
         }
         $this->view->errorsHtml .= '</ul>';
         $this->view->errorsHtml .= '</div>';
     }
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:27,代码来源:Controller.php

示例7: _getConfig

 protected function _getConfig()
 {
     $ret = parent::_getConfig();
     $config = $this->_getStandardConfig('kwf.autoform', 'Settings', trlKwf('Blog Settings'), new Kwf_Asset('wrench_orange'));
     $ret['settings'] = $config;
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:ExtConfig.php

示例8: _initColumns

 protected function _initColumns()
 {
     $this->_filters = array('text' => array('type' => 'TextField'));
     $this->_columns->add(new Kwf_Grid_Column('lastname', trlKwf('Lastname'), 140));
     $this->_columns->add(new Kwf_Grid_Column('firstname', trlKwf('Firstname')));
     $this->_columns->add(new Kwf_Grid_Column_Checkbox('visible', trlKwf('Active'), 40));
 }
开发者ID:nsams,项目名称:aviashelf,代码行数:7,代码来源:MembersController.php

示例9: _initColumns

 protected function _initColumns()
 {
     $this->_filters = array('text' => array('type' => 'TextField'));
     #$companyModel = Kwf_Model_Abstract::getInstance('Companies');
     #$companySelect = $companyModel->select()->whereEquals('Hidden', '0');
     #$docTypeModel = Kwf_Model_Abstract::getInstance('Linkdata');
     #$docTypeSelect = $docTypeModel->select()->whereEquals('name', 'Типы документов');
     #$this->_columns->add(new Kwf_Grid_Column('typeId', trlKwf('Type')))
     #->setEditor(new Kwf_Form_Field_Select('typeId', trlKwf('Type')))
     #->setValues($docTypeModel)
     #->setSelect($docTypeSelect)
     #->setWidth(400)
     #->setAllowBlank(false);
     $this->_columns->add(new Kwf_Grid_Column_Button('edit'));
     $this->_columns->add(new Kwf_Grid_Column('typeName', 'Тип проверки'))->setWidth(200);
     $this->_columns->add(new Kwf_Grid_Column('number', 'Номер документа'))->setWidth(200);
     $this->_columns->add(new Kwf_Grid_Column_Date('startDate', trlKwf('Doc Start Date')));
     $this->_columns->add(new Kwf_Grid_Column_Date('endDate', trlKwf('Doc End Date')))->setRenderer('docCheckDate');
     $this->_columns->add(new Kwf_Grid_Column('gradeName', trlKwf('Note')))->setWidth(300)->setRenderer('checkGrade');
     #$this->_columns->add(new Kwf_Grid_Column_Image('Picture', trlKwf('Image'), 'Picture'))->setMaxHeight(300)->setWidth(250);
     #$select = new Kwf_Form_Field_Select();
     #$select->setValues($companyModel);
     #$select->setSelect($companySelect);
     #$this->_columns->add(new Kwf_Grid_Column('companyId', trlKwf('Spec Doc company')))
     #->setEditor($select)
     #->setType('string')
     #->setShowDataIndex('Name');
 }
开发者ID:nsams,项目名称:aviashelf,代码行数:28,代码来源:DocumentsController.php

示例10: _initColumns

 protected function _initColumns()
 {
     $this->_filters = array('text' => array('type' => 'TextField'));
     $this->_columns->add(new Kwf_Grid_Column('name', trlKwf('Title'), 100));
     $this->_columns->add(new Kwf_Grid_Column('responsibleName', trlKwf('Responsible')))->setWidth(200);
     $this->_columns->add(new Kwf_Grid_Column('phone', trlKwf('Phone')))->setWidth(100);
 }
开发者ID:nsams,项目名称:aviashelf,代码行数:7,代码来源:LandpointsController.php

示例11: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->fields->add(new Kwf_Form_Field_NumberField('width', trlKwf('Width')))->setComment('px')->setWidth(50)->setAllowNegative(false)->setAllowDecimal(false);
     $this->fields->add(new Kwf_Form_Field_TextField('default_value', trlKwf('Default Value')));
     $this->fields->add(new Kwf_Form_Field_Select('vtype', trlKwf('Validator')))->setShowNoSelection(true)->setEmptyText(trlKwf('none'))->setValues(array('email' => trlKwf('E-Mail'), 'url' => trlKwf('Url'), 'alpha' => trlKwf('Alpha'), 'alphanum' => trlKwf('Alphanumeric')));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例12: _getDisclaimerText

 protected function _getDisclaimerText()
 {
     $disclaimerText = array();
     $disclaimerText[''] = trlKwf('None');
     $disclaimerText['de'] = trlKwf('Germany');
     return $disclaimerText;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php

示例13: testConnectionMoreRequests

 public function testConnectionMoreRequests()
 {
     $this->open('/kwf/test/kwf_connection_test');
     $this->waitForConnections();
     sleep(2);
     $this->click("//button[text()='testC']");
     $this->waitForConnections();
     $this->click("//div[contains(text(),'timeoutError')]/../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//div[contains(text(),'timeoutError')]/../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//div[contains(text(),'timeoutError')]/../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//*[contains(text(),'exceptionError')]/../../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//*[contains(text(),'exceptionError')]/../../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//*[contains(text(),'exceptionError')]/../../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//*[contains(text(),'exceptionError')]/../../../../..//button[text()='" . trlKwf("Retry") . "']");
     $this->waitForConnections();
     $this->click("//*[contains(text(),'exceptionError')]/../../../../..//button[text()='" . trlKwf("Abort") . "']");
     $this->waitForConnections();
     $this->click("//div[contains(text(),'timeoutError')]/../../../..//button[text()='" . trlKwf("Abort") . "']");
     $this->waitForConnections();
     $this->open('/kwf/test/kwf_connection_test/get-timeouts');
     $count = $this->getText('//body');
     $this->assertEquals(4, $count);
     $this->open('/kwf/test/kwf_connection_test/get-exceptions');
     $count = $this->getText('//body');
     $this->assertEquals(5, $count);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:32,代码来源:ErrorTest.php

示例14: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $userEditForm = $this->fields->add(new $this->_userDataFormName('user'));
     $userEditForm->setIdTemplate('{0}');
     $root = Kwf_Component_Data_Root::getInstance();
     if ($root) {
         $userDirectory = $root->getComponentByClass('Kwc_User_Directory_Component');
     }
     if ($root && isset($userDirectory) && $userDirectory) {
         $detailClass = Kwc_Abstract::getChildComponentClass($userDirectory->componentClass, 'detail');
         $userEditForm->addUserForms($detailClass, array('general'));
         $userEditForm->fields['firstname']->setAllowBlank(true);
         $userEditForm->fields['lastname']->setAllowBlank(true);
     } else {
         $this->fields->add(new Kwc_User_Detail_General_Form('general', null))->setIdTemplate('{0}');
     }
     $config = Zend_Registry::get('config');
     $authedUser = Kwf_Registry::get('userModel')->getAuthedUser();
     if (isset($authedUser->language) && $config->languages) {
         $data = array();
         foreach ($config->languages as $key => $value) {
             $data[$key] = $value;
         }
         $this->fields->add(new Kwf_Form_Field_Select('language', trlKwf('Language')))->setValues($data);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:27,代码来源:Form.php

示例15: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_Checkbox('visible', trlKwf('Visible')));
     $form = Kwc_Abstract_Form::createChildComponentForm($this->getClass(), "-child", 'child');
     $this->add($form);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Form.php


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