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


PHP LuLu::getService方法代码示例

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


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

示例1: loadActiveModules

 public function loadActiveModules($isAdmin)
 {
     $moduleManager = LuLu::getService('modularityService');
     
     $this->activeModules = $moduleManager->getActiveModules($isAdmin);
     
     $module = $isAdmin ? 'AdminModule' : 'HomeModule';
     foreach ($this->activeModules as $m)
     {
         $moduleId = $m['id'];
         $moduleDir = $m['dir'];
         $ModuleClassName = $m['dir_class'];
         
         $this->setModule($moduleId, [
             'class' => 'source\modules\\' . $moduleDir . '\\' . $module
         ]);
         
         
         $serviceFile= LuLu::getAlias('@source').'\modules\\' .$moduleDir.'\\'.$ModuleClassName.'Service.php';
         
         if(FileHelper::exist($serviceFile))
         {
             $serviceClass = 'source\modules\\' .$moduleDir.'\\'.$ModuleClassName.'Service.php';
             $serviceInstance = new $serviceClass();
             $this->set($serviceInstance->getServiceId(), $serviceInstance);
         }
     }
 }
开发者ID:huasxin,项目名称:lulucms2,代码行数:28,代码来源:BaseApplication.php

示例2: init

 public function init()
 {
     parent::init();
     $this->modularityService = LuLu::getService('modularity');
     $this->rbacService = LuLu::getService('rbac');
     $this->taxonomyService = LuLu::getService('taxonomy');
 }
开发者ID:hucongyang,项目名称:lulucms2,代码行数:7,代码来源:BaseView.php

示例3: initService

 public function initService()
 {
     $this->modularityService = LuLu::getService('modularity');
     $this->rbacService = LuLu::getService('rbac');
     $this->taxonomyService = LuLu::getService('taxonomy');
     $this->menuService = LuLu::getService('menu');
 }
开发者ID:phpsong,项目名称:lulucms2,代码行数:7,代码来源:CommonTrait.php

示例4: __get

 public function __get($name)
 {
     $dot = strpos($name, 'Service');
     if ($dot > 0) {
         $serviceName = substr($name, 0, $dot);
         return LuLu::getService($serviceName);
     }
     return parent::__get($name);
 }
开发者ID:qq443140816,项目名称:lulucms2,代码行数:9,代码来源:CommonTrait.php

示例5: getTaxonomy

 public function getTaxonomy()
 {
     return $this->hasOne(LuLu::getService('taxonomy')->getClass("Taxonomy"), ['id' => 'taxonomy_id']);
 }
开发者ID:Nathanyang,项目名称:lulucms2,代码行数:4,代码来源:Content.php

示例6: init

 public function init()
 {
     parent::init();
     $this->modularityService = LuLu::getService('modularityService');
 }
开发者ID:shunzi250,项目名称:lulucms2,代码行数:5,代码来源:BackController.php

示例7:

<?php

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use source\models\Taxonomy;
use source\libs\Resource;
use source\LuLu;
use yii\helpers\Url;
use source\modules\menu\models\Menu;
/* @var $this \yii\web\View */
/* @var $content string */
$rbacService = LuLu::getService('rbac');
?>

<?php 
$this->beginPage();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <!-- Viewport metatags -->
    <meta name="HandheldFriendly" content="true" />
    <meta name="MobileOptimized" content="320" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

    <!-- iOS webapp metatags -->
开发者ID:liangdabiao,项目名称:lulucms2,代码行数:31,代码来源:container.php

示例8: getTaxonomyCategories

 public static function getTaxonomyCategories()
 {
     $service = LuLu::getService('taxonomy');
     return $service->getTaxonomyCategories();
 }
开发者ID:qq443140816,项目名称:lulucms2,代码行数:5,代码来源:Common.php

示例9: foreach

<?php

use yii\web\View;
use yii\helpers\Html;
use yii\helpers\Url;
use source\libs\Resource;
use source\models\Content;
use source\models\Taxonomy;
use source\LuLu;
/* @var $this yii\web\View */
$moduleId = LuLu::$app->controller->module->id;
$taxonomies = LuLu::getService('taxonomy')->getTaxonomiesAsTree($this->getConfigValue($moduleId . '_taxonomy'));
if (!empty($taxonomies)) {
    ?>
<div class="sidebar-block">
    <h3 class="catListTitle">分类</h3>
    <div>
        <ul>
            <li><?php 
    echo Html::a('所有', ['/' . $moduleId . '/default/list']);
    ?>
</li>
            <?php 
    foreach ($taxonomies as $taxonomy) {
        ?>
            <li><?php 
        echo Html::a($taxonomy['name'], ['/' . $moduleId . '/default/list', 'taxonomy' => $taxonomy['id']]);
        ?>
</li>
            <?php 
    }
开发者ID:phpsong,项目名称:lulucms2,代码行数:31,代码来源:taxonomy.php


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