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


PHP CM_Params::getBoolean方法代码示例

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


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

示例1: prepare

 public function prepare(CM_Params $renderParams, CM_Frontend_Environment $environment, CM_Frontend_ViewResponse $viewResponse)
 {
     $text = $this->getParams()->has('text') ? $renderParams->getString('text') : null;
     $skipDropZone = $renderParams->getBoolean('skipDropZone', false);
     $viewResponse->set('text', $text);
     $viewResponse->set('skipDropZone', $skipDropZone);
 }
开发者ID:NicolasSchmutz,项目名称:cm,代码行数:7,代码来源:File.php

示例2: prepare

 public function prepare(CM_Params $renderParams, CM_Frontend_Environment $environment, CM_Frontend_ViewResponse $viewResponse)
 {
     $viewResponse->set('class', $renderParams->has('class') ? $renderParams->getString('class') : null);
     $viewResponse->set('optionList', $this->_getOptionList());
     $viewResponse->set('translate', $renderParams->getBoolean('translate', $this->_translate) || $renderParams->has('translatePrefix'));
     $viewResponse->set('translatePrefix', $renderParams->has('translatePrefix') ? $renderParams->getString('translatePrefix') : null);
 }
开发者ID:NicolasSchmutz,项目名称:cm,代码行数:7,代码来源:Set.php

示例3: ajax_clearCache

 public function ajax_clearCache(CM_Params $params, CM_Frontend_JavascriptContainer_View $handler, CM_Http_Response_View_Ajax $response)
 {
     $cachesCleared = array();
     if ($params->getBoolean('CM_Cache_Storage_Memcache', false)) {
         $cache = new CM_Cache_Storage_Memcache();
         $cache->flush();
         $cachesCleared[] = 'CM_Cache_Storage_Memcache';
     }
     if ($params->getBoolean('CM_Cache_Storage_Apc', false)) {
         $cache = new CM_Cache_Storage_Apc();
         $cache->flush();
         $cachesCleared[] = 'CM_Cache_Storage_Apc';
     }
     if ($params->getBoolean('CM_Cache_Storage_File', false)) {
         $cache = new CM_Cache_Storage_File();
         $cache->flush();
         $cachesCleared[] = 'CM_Cache_Storage_File';
     }
     $handler->message('Cleared: ' . implode(', ', $cachesCleared));
 }
开发者ID:cargomedia,项目名称:cm,代码行数:20,代码来源:Debug.php

示例4: ajax_error

 public function ajax_error(CM_Params $params, CM_Frontend_JavascriptContainer_View $handler, CM_Http_Response_View_Ajax $response)
 {
     $status = $params->getInt('status', 200);
     $message = $params->has('text') ? $params->getString('text') : null;
     $messagePublic = $params->getBoolean('public', false) ? $message : null;
     if (in_array($status, array(500, 599), true)) {
         $response->addHeaderRaw('HTTP/1.1 ' . $status . ' Internal Server Error');
         $response->sendHeaders();
         exit($message);
     }
     $exception = $params->getString('exception');
     if (!in_array($exception, array('CM_Exception', 'CM_Exception_AuthRequired'), true)) {
         $exception = 'CM_Exception';
     }
     throw new $exception($message, $messagePublic);
 }
开发者ID:aladin1394,项目名称:CM,代码行数:16,代码来源:Example.php


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