本文整理汇总了PHP中trlKwf函数的典型用法代码示例。如果您正苦于以下问题:PHP trlKwf函数的具体用法?PHP trlKwf怎么用?PHP trlKwf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了trlKwf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: getTemplateVars
public function getTemplateVars($values, $fieldNamePostfix = '', $idPrefix = '')
{
$name = $this->getFieldName();
$ret = parent::getTemplateVars($values, $fieldNamePostfix, $idPrefix);
//todo: escapen
$ret['id'] = $idPrefix . $name . $fieldNamePostfix;
if ($this->getShowText()) {
throw new Kwf_Exception("ShowField shows a field of a row, but no static text set by 'setShowText'. Use Kwf_Form_Field_Panel instead.");
}
$ret['html'] = ' ';
if (isset($values[$name]) && $values[$name] != '') {
$v = $values[$name];
if ($this->getTpl() == '{value:nl2br}') {
$v = nl2br($v);
} else {
if ($this->getTpl() == '{value:localizedDatetime}') {
$date = new Kwf_Date($v);
$v = $date->format(trlKwf('Y-m-d H:i'));
} else {
if ($this->getTpl() == '{value:localizedDate}') {
$date = new Kwf_Date($v);
$v = $date->format(trlKwf('Y-m-d'));
}
}
}
$ret['html'] = '<span class="fieldContent">' . $v . '</span>';
}
return $ret;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:29,代码来源:ShowField.php
示例17: _initColumns
protected function _initColumns()
{
parent::_initColumns();
$this->_columns->add(new Kwf_Grid_Column('recipient', trlKwf('Recipient'), 200));
$this->_columns->add(new Kwf_Grid_Column_Datetime('date', trlKwf('Date'), 100));
$this->_columns->add(new Kwf_Grid_Column('ip', trlKwf('IP-Address'), 100));
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:StatisticsClicksController.php
示例18: _initColumns
protected function _initColumns()
{
$this->_filters = array('text' => array('type' => 'TextField'));
$this->_columns->add(new Kwf_Grid_Column('Number', trlKwf('Number'), 100));
$this->_columns->add(new Kwf_Grid_Column_Date('StartDate', trlKwf('Start Date'), 100));
$this->_columns->add(new Kwf_Grid_Column_Date('EndDate', trlKwf('End Date'), 100));
}
开发者ID:nsams,项目名称:aviashelf,代码行数:7,代码来源:PolisesController.php
示例19: _initFields
protected function _initFields()
{
parent::_initFields();
$showDirectoryClass = Kwc_Abstract::getSetting($this->getClass(), 'showDirectoryClass');
$hideDirectoryClasses = Kwc_Abstract::getSetting($this->getClass(), 'hideDirectoryClasses');
$cards = $this->add(new Kwf_Form_Container_Cards('source_component_id', trlKwf('Directory')));
$defaultCard = null;
$categories = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Directories_Category_Directory_Component');
foreach ($categories as $category) {
$itemDirectory = $category->parent;
if (is_instance_of($itemDirectory->componentClass, $showDirectoryClass)) {
foreach ($hideDirectoryClasses as $c) {
if (is_instance_of($itemDirectory->componentClass, $c)) {
continue 2;
}
}
$categoriesModel = $category->getComponent()->getChildModel();
$select = $categoriesModel->select()->whereEquals('component_id', $category->componentId);
$values = array();
foreach ($categoriesModel->getRows($select) as $row) {
$values[$row->id] = $row->name;
}
$card = $cards->add();
$card->setTitle($category->parent->getTitle());
$card->setName($category->componentId);
if (!$defaultCard) {
$defaultCard = $category->componentId;
}
$model = Kwf_Model_Abstract::getInstance('Kwc_Directories_Category_ShowCategories_Model');
$card->add(new Kwf_Form_Field_MultiCheckboxLegacy($model, trlKwf('Categories')))->setValues($values)->setReferences(array('columns' => array('component_id'), 'refColumns' => array('id')))->setColumnName('category_id');
}
}
$cards->setDefaultValue($defaultCard);
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:34,代码来源:Form.php
示例20: _initColumns
protected function _initColumns()
{
parent::_initColumns();
$this->_columns->add(new Kwf_Grid_Column('id'));
//shows editDialog
$this->_columns->add(new Kwf_Grid_Column_Button('properties', ' ', 20))->setButtonIcon('/assets/silkicons/newspaper.png')->setTooltip(trlKwf('Properties'));
if (is_instance_of(Kwc_Abstract::getSetting($this->_getParam('class'), 'extConfig'), 'Kwc_Directories_Item_Directory_ExtConfigEditButtons')) {
$extConfigType = 'extConfig';
} else {
if (is_instance_of(Kwc_Abstract::getSetting($this->_getParam('class'), 'extConfigControllerIndex'), 'Kwc_Directories_Item_Directory_ExtConfigEditButtons')) {
$extConfigType = 'extConfigControllerIndex';
}
}
$extConfig = Kwf_Component_Abstract_ExtConfig_Abstract::getInstance($this->_getParam('class'), $extConfigType)->getConfig(Kwf_Component_Abstract_ExtConfig_Abstract::TYPE_DEFAULT);
$extConfig = $extConfig['items'];
if (count($extConfig['countDetailClasses']) > 1 && !$this->_getModel()->hasColumn('component')) {
throw new Kwf_Exception('If you have more than one detail-component your table has to have a column named "component"');
}
$i = 0;
foreach ($extConfig['contentEditComponents'] as $ec) {
$name = Kwf_Trl::getInstance()->trlStaticExecute(Kwc_Abstract::getSetting($ec['componentClass'], 'componentName'));
$icon = Kwc_Abstract::getSetting($ec['componentClass'], 'componentIcon');
$icon = new Kwf_Asset($icon);
$this->_columns->add(new Kwc_Directories_Item_Directory_Trl_ControllerEditButton('edit_' . $i, ' ', 20))->setColumnType('editContent')->setEditComponentClass($ec['componentClass'])->setEditComponent($ec['component'])->setEditType($ec['type'])->setEditIdTemplate($ec['idTemplate'])->setEditComponentIdSuffix($ec['componentIdSuffix'])->setButtonIcon($icon->toString(array('arrow')))->setTooltip(trlKwf('Edit {0}', $name));
$i++;
}
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:27,代码来源:Controller.php
注:本文中的trlKwf函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论