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


PHP Bundle::get方法代码示例

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


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

示例1: getUsers

 private function getUsers($name)
 {
     try {
         $users = $this->model->getUsersWithName($name);
         $this->values->users = $users;
         $this->values->name = $name;
     } catch (NoResultException $e) {
         $this->request->error = Bundle::get('friends.users.not.found', $name);
     }
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:10,代码来源:friendscontroller.class.php

示例2: build

 /**
  * Create requested Form Object.
  * @author anza
  * @param string $form Name of Form Object to be created.
  * @throws FormNotFoundException When impossible to find class of Form Object.
  * @return New Form Object if its class exists.
  */
 public static function build($form)
 {
     try {
         $fo = $form . self::FO;
         if (class_exists($fo)) {
             return new $fo();
         }
     } catch (LogicException $e) {
         throw new FormNotFoundException(Bundle::get('form.validation.form.not.found', $fo));
     }
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:18,代码来源:fofactory.class.php

示例3: prepareMainLinks

 private function prepareMainLinks()
 {
     $friendsLink = DOMFactory::getLink($this->url->getCustomActionURL('friends'), Bundle::get('link.header.friends.link'))->addClass('bold tahoma-13');
     $friendsFindLink = DOMFactory::getLink($this->url->getCustomActionURL('friends', 'find'), Bundle::get('link.header.friends.find.link'))->addClass('bold tahoma-13');
     $videoLink = DOMFactory::getLink($this->url->getCustomActionURL('video'), Bundle::get('link.header.video'))->addClass('bold tahoma-13');
     $addVideoLink = DOMFactory::getLink($this->url->getCustomActionURL('video', 'add'), Bundle::get('link.header.video.add'))->addClass('bold tahoma-13');
     $this->template->friendsLink = DOMFactory::getLi($friendsLink);
     $this->template->friendsFindLink = DOMFactory::getLi($friendsFindLink);
     $this->template->videoLink = DOMFactory::getLi($videoLink);
     $this->template->addVideoLink = DOMFactory::getLi($addVideoLink);
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:11,代码来源:menuview.class.php

示例4: add

 public function add(AbstractController $controller, $redirect)
 {
     try {
         $fo = FOFactory::build('comment');
         if (!$fo->isSent()) {
             $this->redirectToCaller($redirect);
         }
         $this->model->add($fo, $fo->getType(), $fo->getId());
         $this->redirectToCaller($redirect);
     } catch (FormValidationException $e) {
         $this->values->error = Bundle::get('form.validation.invalid.value', $e->getMessage());
         $controller->setAction($redirect);
     }
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:14,代码来源:commentcontroller.class.php

示例5: add

 /**
  * @Invocable
  */
 protected function add()
 {
     try {
         $fo = FOFactory::build('newvideo');
         if (!$fo->isSent()) {
             return;
         }
         $this->model->add($fo);
         Navigator::redirectTo('video');
     } catch (FormValidationException $e) {
         $e->getTraceAsString();
         $this->request->error = Bundle::get('form.validation.invalid.value', $e->getMessage());
     } catch (VideoNotExistsException $e) {
         $e->getTraceAsString();
         $this->request->error = Bundle::get('form.validation.video.url.incorrect', $e->getMessage());
     }
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:20,代码来源:videocontroller.class.php

示例6: register

 /**
  * Validate form data and register new user.
  * @Invocable
  */
 protected function register()
 {
     try {
         $fo = FOFactory::build('register');
         if (!$fo->isSent()) {
             return;
         }
         $this->model->register($fo);
         $this->request->success = Bundle::get('form.validation.field.register.success');
     } catch (FormValidationException $e) {
         $e->getTraceAsString();
         $this->request->error = Bundle::get('form.validation.invalid.value', $e->getMessage());
     } catch (DuplicateException $e) {
         $e->getTraceAsString();
         $this->request->error = Bundle::get('form.validation.login.taken', $e->getField());
     }
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:21,代码来源:registercontroller.class.php

示例7: function

<?php

use Admin\Libraries\ModelHelper;
use Admin\Libraries\Fields\Field;
use Admin\Libraries\Column;
use Admin\Libraries\Sort;
//View Composers
//admin index view
View::composer('administrator::index', function ($view) {
    //get a model instance that we'll use for constructing stuff
    $modelInstance = ModelHelper::getModel($view->modelName);
    $columns = Column::getColumns($modelInstance);
    $editFields = Field::getEditFields($modelInstance);
    $bundleConfig = Bundle::get('administrator');
    //add the view fields
    $view->modelTitle = Config::get('administrator::administrator.models.' . $view->modelName . '.title', $view->modelName);
    $view->modelSingle = Config::get('administrator::administrator.models.' . $view->modelName . '.single', $view->modelTitle);
    $view->columns = $columns['columns'];
    $view->includedColumns = $columns['includedColumns'];
    $view->primaryKey = $modelInstance::$key;
    $view->sort = Sort::get($modelInstance)->toArray();
    $view->rows = ModelHelper::getRows($modelInstance, $view->sort);
    $view->editFields = $editFields['arrayFields'];
    $view->dataModel = $editFields['dataModel'];
    $view->filters = ModelHelper::getFilters($modelInstance);
    $view->baseUrl = URL::to_route('admin_index');
    $view->bundleHandles = $bundleConfig['handles'];
    $view->expandWidth = ModelHelper::getExpandWidth($modelInstance);
    $view->modelInstance = $modelInstance;
    $view->model = isset($view->model) ? $view->model : false;
});
开发者ID:ajb,项目名称:rfpez,代码行数:31,代码来源:viewComposers.php

示例8:

<?php

// Flyswatter Routes
Route::controller(array('flyswatter::home', 'flyswatter::issue', 'flyswatter::seed', 'flyswatter::comment', 'flyswatter::project'));
View::share('flyswatter', '/' . Bundle::get('flyswatter')['handles']);
View::share('projects', \Flyswatter\Models\Project::all());
开发者ID:SerdarSanri,项目名称:flyswatter,代码行数:6,代码来源:routes.php

示例9: testRouteResolution

 public function testRouteResolution()
 {
     Bundle::start('flyswatter');
     $this->assertEquals('flyswatter::home@index', Router::route('GET', Bundle::get('flyswatter')['handles'])->action['uses']);
 }
开发者ID:SerdarSanri,项目名称:flyswatter,代码行数:5,代码来源:routes.test.php

示例10: sendPassword

 /**
  * New password is send to email of selected User.
  * @param User $user
  * @param string $password
  */
 private function sendPassword(User $user, $password)
 {
     $subject = Bundle::get('recover.mail.subject');
     $message = $password;
     Mailer::send($user->getEmail(), $subject, $message);
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:11,代码来源:authmodel.class.php

示例11: sendActivationLink

 /**
  * Sends email with activation link.
  * @param User $user
  * @author anza
  */
 private function sendActivationLink(User $user)
 {
     $subject = Bundle::get('register.mail.subject');
     $message = URL::getInstance()->getCustomActionURL('auth', 'activate') . SLASH . $user->getActivation();
     Mailer::send($user->getEmail(), $subject, $message);
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:11,代码来源:registermodel.class.php

示例12: isset

                <th>{{ Lang::line('modules::lang.Name')->get(ADM_LANG) }}</th>
                <th><span>{{ Lang::line('modules::lang.Description')->get(ADM_LANG) }}</span></th>
                <th>{{ Lang::line('modules::lang.Version')->get(ADM_LANG) }}</th>
                <th>{{ Lang::line('modules::lang.Status')->get(ADM_LANG) }}</th>
                
            </tr>
        </thead>    
        <tbody>
            @if(isset($core_modules) and !empty($core_modules))
            @foreach ($core_modules as $module)
            <tr>
                @if($module->slug == 'admin')
                    <td class="collapse"><a href="{{ URL::base().'/'.ADM_URI }}">{{ $module->name }}</a></td>
                @else
                    <?php 
$bundle = Bundle::get($module->slug);
?>
                    <?php 
$handles = isset($bundle['handles']) ? 1 : 0;
?>
                    @if($module->installed and $module->enabled and $handles == 1)
                    <td class="collapse"><a href="{{ URL::base().'/'.ADM_URI.'/'.$module->slug }}">{{ $module->name }}</a></td>
                    @else
                    <td class="collapse">{{ $module->name }}</td>
                    @endif
                @endif

                <td>{{ Lang::line($module->slug.'::lang.'.$module->description)->get(ADM_LANG) }}</td>
                <td class="align-center">{{ $module->version }}</td>
                <td class="align-center">OK</td>
            </tr>
开发者ID:juaniiie,项目名称:mwi,代码行数:31,代码来源:core.blade.php

示例13: foreach

			<div class="row-fluid">
				<div class="span3">
					<div class="well sidebar-nav">
						<ul class="nav nav-list">
							<li class="nav-header">Log Files</li>
							<?php 
if ($files) {
    ?>
								<?php 
    foreach ($files as $file) {
        ?>
									<?php 
        $file = str_replace('.log', '', $file);
        ?>
									<li><a href="<?php 
        echo URL::to(Bundle::get('logviewer.handles') . '?date=' . $file);
        ?>
"><?php 
        echo $file;
        ?>
</a></li>
								<?php 
    }
    ?>
							<?php 
}
?>
						</ul>
					</div><!--/.well -->
				</div><!--/span-->
				<div class="span9">
开发者ID:acmadi,项目名称:diantaksi,代码行数:31,代码来源:viewer.php

示例14: function

    // add styles to layout
    Asset::container('header')->add('bootstrap_style', 'bundles/gotin/css/bootstrap.css');
    Asset::container('header')->add('bootstrap_res', 'bundles/gotin/css/bootstrap-responsive.css');
    Asset::container('header')->add('docs_style', 'bundles/gotin/css/gotin.css');
    Asset::container('header')->add('gotin_style', 'bundles/gotin/css/docs.css');
    // add scripts to layout
    Asset::container('header')->add('jquery', 'bundles/gotin/js/jquery.js');
    Asset::container('header')->add('bootstrap', 'bundles/gotin/js/bootstrap.min.js');
    if (Config::get('gotin::gotin.login_mode') == "ajax") {
        Asset::container('header')->add('gotin', 'bundles/gotin/js/gotin.js');
    }
});
/**
 * Filter admin access
 */
Route::filter('auth', function () {
    if (!Auth::gotin_check()) {
        Auth::logout();
        return Redirect::to_action('login');
    }
    // Admin role protected routes
    $admin_protected = array('users', 'roles');
    $gotin_route = Bundle::get('gotin')['handles'];
    foreach ($admin_protected as $ap) {
        $r = $gotin_route . "\\/" . $ap;
        $match = preg_match("/" . $r . "/", URI::current());
        if ($match && !Auth::is("Admin")) {
            return Redirect::to_action('gotin::dashboard');
        }
    }
});
开发者ID:SerdarSanri,项目名称:gotin,代码行数:31,代码来源:routes.php

示例15: activate

 /**
  * Activate existing User.
  * @Invocable
  */
 public function activate()
 {
     try {
         $activeHash = $this->validateActiveHash();
         $this->model->activate($activeHash);
         $this->request->success = Bundle::get('form.validation.field.register.activated');
     } catch (NoResultException $e) {
         $e->getTraceAsString();
         Navigator::redirectTo($this);
     }
 }
开发者ID:anzasolutions,项目名称:simlandia,代码行数:15,代码来源:authcontroller.class.php


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