當前位置: 首頁>>代碼示例>>PHP>>正文


PHP dmString::strtolower方法代碼示例

本文整理匯總了PHP中dmString::strtolower方法的典型用法代碼示例。如果您正苦於以下問題:PHP dmString::strtolower方法的具體用法?PHP dmString::strtolower怎麽用?PHP dmString::strtolower使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dmString的用法示例。


在下文中一共展示了dmString::strtolower方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: linkToHistory

 public function linkToHistory($object, $params)
 {
     if (!$object->getTable()->isVersionable()) {
         return '';
     }
     return '<li class="sf_admin_action_history">' . link_to1(__($params['label']), $this->getRouteArrayForAction('history', $object), array('class' => 'sf_admin_action s16 s16_clock_history', 'title' => __($params['title'], array('%1%' => dmString::strtolower(__($this->getModule()->getName())))))) . '</li>';
 }
開發者ID:rafaelgou,項目名稱:diem,代碼行數:7,代碼來源:dmAdminModelGeneratorHelper.php

示例2: listenToConfigUpdatedEvent

 public function listenToConfigUpdatedEvent(sfEvent $event)
 {
     $setting = $event['setting'];
     if ('internal' == dmString::strtolower($setting->groupName)) {
         return;
     }
     $this->log(array('server' => $_SERVER, 'action' => 'update', 'type' => 'config', 'subject' => sprintf('%s = %s ( %s )', $setting->name, dmString::truncate($setting->value, 80), $event['culture'])));
 }
開發者ID:theolymp,項目名稱:diem,代碼行數:8,代碼來源:dmEventLog.php

示例3: linkToImportSentences

 public function linkToImportSentences($object, $params)
 {
     if ($this->module->getSecurityManager()->userHasCredentials('edit', $object)) {
         $title = __(isset($params['title']) ? $params['title'] : $params['label'], array('%1%' => dmString::strtolower(__($this->getModule()->getName()))), 'dm');
         return '<li class="sf_admin_action_import_sentences">' . link_to1(__($params['label'], array(), $this->getI18nCatalogue()), $this->getRouteArrayForAction('importSentences', $object), array('class' => 's16 s16_save dm_import_link sf_admin_action', 'title' => $title)) . '</li>';
     }
     return '';
 }
開發者ID:theolymp,項目名稱:diem,代碼行數:8,代碼來源:dmCatalogueGeneratorHelper.class.php

示例4: linkTo_preview

 public function linkTo_preview($object, $params)
 {
     if ($this->module->getSecurityManager()->userHasCredentials('edit', $object)) {
         $title = __(isset($params['title']) ? $params['title'] : $params['label'], array('%1%' => dmString::strtolower(__($this->getModule()->getName()))), 'dm');
         return '<li class="sf_admin_action_preview">' . link_to1(__($params['label'], array(), $this->getI18nCatalogue()), $this->getRouteArrayForAction('preview', $object), array('class' => 's16 s16_right_little dm_preview_link sf_admin_action', 'title' => $title, 'method' => 'get')) . '</li>';
     }
     return '';
 }
開發者ID:runopencode,項目名稱:diem-extended,代碼行數:8,代碼來源:dmMailTemplateGeneratorHelper.class.php

示例5: renderLabel

 public function renderLabel()
 {
     if ($widgetType = $this->getOption('widget_type')) {
         return sprintf('<span class="widget_add move" id="dmwa_%s-%s">%s</span>', $widgetType->getModule(), $widgetType->getAction(), dmString::strtolower(parent::renderLabel()));
     } elseif ($widget = $this->getOption('clipboard_widget')) {
         return sprintf('<span class="widget_paste move dm_%s" id="dmwp_%d">%s</span>', $this->getOption('clipboard_method'), $widget->get('id'), dmString::strtolower(parent::renderLabel()));
     } elseif ($this->getOption('root_add')) {
         return '<a class="tipable s24block s24_add widget24" title="' . $this->__('Add widgets') . '"></a>';
     }
     return '<a>' . dmString::strtolower(parent::renderLabel()) . '</a>';
 }
開發者ID:theolymp,項目名稱:diem,代碼行數:11,代碼來源:dmFrontAddMenu.php

示例6: renderLabel

 public function renderLabel()
 {
     if ($this->getOption('behavior_key')) {
         return sprintf('<span class="behavior_add move" id="dmba_%s"><img src="%s" width="16" height="16" />%s</span>', $this->getOption('behavior_key'), $this->getOption('behavior_icon'), parent::renderLabel());
     } elseif ($this->getOption('clipboard_action')) {
         return sprintf('<span class="behavior_add clipboard %s move" id="dmba_clipboard_behavior_id_%s"><img src="%s" width="16" height="16" />%s</span>', $this->getOption('clipboard_action'), $this->getOption('clipboard_id'), $this->getOption('clipboard_icon'), dmString::strtolower(parent::renderLabel()));
     } elseif ($this->getOption('root_add')) {
         return '<a class="tipable s24block s24_gear widget24" title="' . $this->__('Add behaviors') . '"></a>';
     }
     return '<a>' . dmString::strtolower(parent::renderLabel()) . '</a>';
 }
開發者ID:runopencode,項目名稱:diem-extended,代碼行數:11,代碼來源:dmFrontBehaviorsAddMenu.class.php

示例7: render

 public function render()
 {
     $preparedAttributes = $this->prepareAttributesForHtml($this->options);
     $tagName = $preparedAttributes['tag'];
     unset($preparedAttributes['tag']);
     if ($tagName === 'span') {
         unset($preparedAttributes['href'], $preparedAttributes['target'], $preparedAttributes['title']);
     }
     $text = $this->renderText();
     if (isset($preparedAttributes['title']) && dmString::strtolower($preparedAttributes['title']) == dmString::strtolower($text)) {
         unset($preparedAttributes['title']);
     }
     return $this->doRender($tagName, $this->convertAttributesToHtml($preparedAttributes), $text);
 }
開發者ID:rafix,項目名稱:diem,代碼行數:14,代碼來源:dmFrontLinkTagPage.php

示例8: cleanText

 public static function cleanText($text)
 {
     return trim(preg_replace('|\\s{2,}|', ' ', preg_replace('|\\W|', ' ', dmString::strtolower(dmString::transliterate(strip_tags(str_replace(array("\n", '<'), array(' ', ' <'), $text)))))));
 }
開發者ID:eXtreme,項目名稱:diem,代碼行數:4,代碼來源:dmSearchIndex.php

示例9: executeBatch

 public function executeBatch(sfWebRequest $request)
 {
     if (!($ids = $request->getParameter('ids'))) {
         $this->getUser()->setFlash('error', 'You must at least select one item.');
         $this->redirect('@' . $this->getDmModule()->getUnderscore());
     }
     foreach ($request->getParameterHolder()->getAll() as $key => $value) {
         if (strncmp($key, 'batch', 5) === 0) {
             $action = $key;
             break;
         }
     }
     if (!isset($action)) {
         $this->getUser()->setFlash('error', 'You must select an action to execute on the selected items.');
         $this->redirect('@' . $this->getDmModule()->getUnderscore());
     }
     if (!method_exists($this, $method = 'execute' . ucfirst($action))) {
         throw new InvalidArgumentException(sprintf('You must create a "%s" method for action "%s"', $method, $action));
     }
     if (!$this->getUser()->hasCredential($this->configuration->getCredentials($action))) {
         $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
     }
     $validator = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => $this->getDmModule()->getModel()));
     try {
         // validate ids
         $ids = $validator->clean($ids);
         //@todo add record security check here ! using dmModuleSecurityManager, create new method in it
         //if there are some ids for which user can't execute the method, remove them, then execute them
         //something like
         $_action = substr($action, 5);
         $_action = dmString::strtolower($_action);
         $authorizedIdsForAction = $this->getDmModule()->getSecurityManager()->getIdsForAuthorizedActionWithinIds($_action, $this->getUser()->getUser(), $ids);
         if (!$authorizedIdsForAction) {
             throw new LogicException('You cannot delete those elements because you are not authorized to do so.', 401);
         }
         if (count($ids) != count($authorizedIdsForAction)) {
             $request->setParameter('excluded_ids', array_diff($ids, $authorizedIdsForAction));
         }
         $request->setParameter('ids', $authorizedIdsForAction);
         // execute batch
         $this->{$method}($request);
     } catch (sfValidatorError $e) {
         $this->getUser()->setFlash('error', 'A problem occurs when deleting the selected items as some items do not exist anymore. ');
     } catch (LogicException $e) {
         $this->getUser()->setFlash('error', $e->getMessage());
     }
     $this->redirect('@' . $this->getDmModule()->getUnderscore());
 }
開發者ID:rafix,項目名稱:diem,代碼行數:48,代碼來源:dmAdminBaseGeneratedModuleActions.php


注:本文中的dmString::strtolower方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。