本文整理汇总了PHP中CRM_Utils_File::concat方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_File::concat方法的具体用法?PHP CRM_Utils_File::concat怎么用?PHP CRM_Utils_File::concat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_File
的用法示例。
在下文中一共展示了CRM_Utils_File::concat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
/**
* @var \Civi\Angular\Manager $angular
*/
//Use our manager instead of the one provided by core
$angular = new Civi\Angular\VolunteerManager(\CRM_Core_Resources::singleton());
$moduleNames = $this->parseModuleNames(\CRM_Utils_Request::retrieve('modules', 'String'), $angular);
switch (\CRM_Utils_Request::retrieve('format', 'String')) {
case 'json':
case '':
$this->send('application/javascript', json_encode($this->getMetadata($moduleNames, $angular)));
break;
case 'js':
$digest = $this->digestJs($angular->getResources($moduleNames, 'js', 'path'));
//Tell crmResource to use our ajax end-point
$digest = str_replace("ajax/angular-modules", "ajax/volunteer-angular-modules", $digest);
$this->send('application/javascript', $digest);
break;
case 'css':
$this->send('text/css', \CRM_Utils_File::concat($angular->getResources($moduleNames, 'css', 'path'), "\n"));
break;
default:
\CRM_Core_Error::fatal("Unrecognized format");
}
\CRM_Utils_System::civiExit();
}
示例2: run
/**
* See class description.
*/
public function run()
{
/**
* @var \Civi\Angular\Manager $angular
*/
$angular = \Civi::service('angular');
$moduleNames = $this->parseModuleNames(\CRM_Utils_Request::retrieve('modules', 'String'), $angular);
switch (\CRM_Utils_Request::retrieve('format', 'String')) {
case 'json':
case '':
$this->send('application/javascript', json_encode($this->getMetadata($moduleNames, $angular)));
break;
case 'js':
$this->send('application/javascript', $this->digestJs($angular->getResources($moduleNames, 'js', 'path')));
break;
case 'css':
$this->send('text/css', \CRM_Utils_File::concat($angular->getResources($moduleNames, 'css', 'path'), "\n"));
break;
default:
\CRM_Core_Error::fatal("Unrecognized format");
}
\CRM_Utils_System::civiExit();
}