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


PHP View::getName方法代码示例

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


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

示例1: compose

 public function compose(View $view)
 {
     if ($view->getName() == 'frontend.property.compare_bar') {
         $propertiesInComparison = PropertyCompareHelper::getCurrentList();
         $view->with('propertiesInComparison', $propertiesInComparison);
     }
 }
开发者ID:yohanes1989,项目名称:goprop,代码行数:7,代码来源:PropertyComposer.php

示例2: compose

 /**
  * Bind data to the view.
  *
  * @param  View $view
  *
  * @throws \Exception
  */
 public function compose(View $view)
 {
     if (empty($view->name) and !str_contains($view->getName(), ['csrf', 'group'])) {
         //TODO: check if these exceptions can actually be caught. Perhaps it needs to log to file instead?
         throw new \Exception('Input needs a "name" parameter set in ' . $view->getPath());
     }
     $data['control_id'] = $view->bsb_pkg_ref . $view->form_id . $view->name;
     //TODO: handle unique id if name is repeated within the form with [] array syntax and radios/checkboxes
     if (!empty($view->name) and $view->errors->has($view->name)) {
         $data['has_error'] = true;
         if (!$view->group_form_errors) {
             $view->nest('control_error_content', $view->bsb_pkg_ref . '::form.control.errors', ['errors' => $view->errors->get($view->name)]);
         }
     }
     if ($view->control_error_content or $view->help_text or $view->html_help_text) {
         $data['control_description_id'] = $data['control_id'] . 'desc';
     }
     $view->with($data);
 }
开发者ID:fewagency,项目名称:twbs-blade,代码行数:26,代码来源:InputComposer.php

示例3: callCreator

 /**
  * Call the creator for a given view.
  *
  * @param  \Illuminate\Contracts\View\View  $view
  * @return void
  */
 public function callCreator(ViewContract $view)
 {
     $this->events->fire('creating: ' . $view->getName(), [$view]);
 }
开发者ID:hannesvdvreken,项目名称:framework,代码行数:10,代码来源:Factory.php


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