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


PHP Layout::find方法代码示例

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


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

示例1: alter

 function alter(Layout $layout)
 {
     $matched = $layout->find($this->path);
     if ($matched) {
         $this->mergeInto($matched->blocks);
     } elseif (count($this->path) == 2 and !reset($this->path) and $view = $layout->find('')) {
         $view->add(array(join('.', end($this->path)) => $this->blocks));
     } else {
         Log::info_Alter("No matching block [{$this->pathStr()}] to {$this->type}.");
     }
     return $this;
 }
开发者ID:SerdarSanri,项目名称:VaneMart,代码行数:12,代码来源:LayoutAlter.php

示例2: passLayout

 public static function passLayout()
 {
     $id = AppHelper::getLayoutId();
     $layout = Layout::find($id);
     //return $layout->full_layout;
     eval('?' . '>' . $layout->full_layout);
 }
开发者ID:BDMADE,项目名称:laracms,代码行数:7,代码来源:AdminLayoutController.php

示例3: updateDevice

 public function updateDevice()
 {
     $name = Input::get('name');
     $dtp = Input::get('dtp');
     $layout = Layout::find(Input::get('id'));
     if (!empty($name)) {
         $layout->name = $name;
     }
     if (!empty($dtp)) {
         $layout->dtp = $dtp;
     }
     $layout->save();
 }
开发者ID:axelardu,项目名称:festic-partner,代码行数:13,代码来源:DesignerController.php

示例4: get_layouts

 public static function get_layouts($id = null)
 {
     // We return an array if returning all layouts
     // Other wise return the object if we looking up a specific layout id
     $return = array();
     // Are we looking for a specific studio layout id?
     // If not we return all layouts
     if ($id) {
         // Return a specific studio layout by ID
         if (($data = Layout::find($id)) != NULL) {
             $data->formatted_cost = $data->cost == '' ? '' : '£' . number_format($data->cost, 2);
             $return = $data;
         }
     } else {
         // Get all studio layout data and iterate the returned data
         $layouts = DB::table('quotation_layouts')->order_by('size_y', 'asc')->order_by('size_x', 'asc')->get();
         foreach ($layouts as $layout) {
             $layout->formatted_cost = $layout->cost == '' ? '' : '£' . number_format($layout->cost, 2);
             $code = str_replace('.', '', $layout->size_x) . 'x' . str_replace('.', '', $layout->size_y);
             $return[$code] = $layout;
         }
     }
     return $return;
 }
开发者ID:shainmcalindon,项目名称:boothsgardenstudios,代码行数:24,代码来源:Layouts.php

示例5: loadQuote

 private function loadQuote(Quotation $quote)
 {
     // Find layout
     $layout = Layout::find($quote->quotation_layouts_id);
     $customer = Customer::find($quote->customer_id);
     // Init
     \Laravel\Session::put('quote_id', $quote->id);
     \Laravel\Session::put('quote_email', $customer->email);
     \Laravel\Session::put('quote_layout', $layout);
     \Laravel\Session::put('quote_layout_id', $layout->id);
     \Laravel\Session::put('quote_size', $layout->size_x . 'x' . $layout->size_y);
     \Laravel\Session::put('quote_postcode', $quote->postcode);
     //Customise
     \Laravel\Session::put('quote_customise_swap_window', $quote->quote_customise_swap_window);
     \Laravel\Session::put('quote_customise_swap_wall', $quote->quote_customise_swap_wall);
     \Laravel\Session::put('quote_customise_extra_door', $quote->quote_customise_extra_door);
     \Laravel\Session::put('quote_customise_fanlight', $quote->quote_customise_fanlight);
     \Laravel\Session::put('quote_customise_half_window', $quote->quote_customise_half_window);
     \Laravel\Session::put('quote_customise_picture_window', $quote->quote_customise_picture_window);
     //Decking & floyover
     \Laravel\Session::put('quote_decking_composite_deck_910_910', $quote->quote_decking_composite_deck_910_910);
     \Laravel\Session::put('quote_decking_composite_deck_910_1820', $quote->quote_decking_composite_deck_910_1820);
     \Laravel\Session::put('quote_decking_composite_deck_910_2730', $quote->quote_decking_composite_deck_910_2730);
     \Laravel\Session::put('quote_decking_flyover_roof_910_910', $quote->quote_decking_flyover_roof_910_910);
     \Laravel\Session::put('quote_decking_flyover_roof_910_1820', $quote->quote_decking_flyover_roof_910_1820);
     \Laravel\Session::put('quote_decking_flyover_roof_910_2730', $quote->quote_decking_flyover_roof_910_2730);
     // Electrics
     \Laravel\Session::put('quote_electrics_double_sockets_450', $quote->quote_electrics_double_sockets_450);
     \Laravel\Session::put('quote_electrics_double_sockets_1150', $quote->quote_electrics_double_sockets_1150);
     \Laravel\Session::put('quote_electrics_light_switch', $quote->quote_electrics_light_switch);
     \Laravel\Session::put('quote_electrics_panel_heater', $quote->quote_electrics_panel_heater);
     \Laravel\Session::put('quote_electrics_double_floor_socket', $quote->quote_electrics_double_floor_socket);
     \Laravel\Session::put('quote_electrics_fused_spur_socket', $quote->quote_electrics_fused_spur_socket);
     // Internals
     \Laravel\Session::put('quote_internals_silver_aluminium_venitian_blind_no_screws', $quote->quote_internals_silver_aluminium_venitian_blind_no_screws);
     \Laravel\Session::put('quote_internals_recessed_blinds', $quote->quote_internals_recessed_blinds);
     \Laravel\Session::put('quote_internals_internal_910_partition_wall', $quote->quote_internals_internal_910_partition_wall);
     \Laravel\Session::put('quote_internals_internal_door_dividing_studio', $quote->quote_internals_internal_door_dividing_studio);
     \Laravel\Session::put('quote_internals_internal_wall_corner_post', $quote->quote_internals_internal_wall_corner_post);
     // Other
     \Laravel\Session::put('quote_other_decoupled_floor', $quote->quote_other_decoupled_floor);
     \Laravel\Session::put('quote_other_aquastep_oak_floor', $quote->quote_other_aquastep_oak_floor);
     \Laravel\Session::put('quote_other_walls_to_timber', $quote->quote_other_walls_to_timber);
     \Laravel\Session::put('quote_other_taller_walls', $quote->quote_other_taller_walls);
     \Laravel\Session::put('quote_other_entry_steps', $quote->quote_other_entry_steps);
     \Laravel\Session::put('quote_other_entry_handrail', $quote->quote_other_entry_handrail);
     \Laravel\Session::put('quote_other_skirt', $quote->quote_other_skirt);
 }
开发者ID:shainmcalindon,项目名称:boothsgardenstudios,代码行数:48,代码来源:quotations.php

示例6: index

 function index()
 {
     $this->display('layout/index', array('layouts' => Layout::find(array('order' => 'position'))));
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:4,代码来源:LayoutController.php

示例7: header

            $output = $dispatchContent;
        } else {
            header('Content-Type: text/html; charset=utf-8');
            // Include a themes init file, to allow a theme to configure some things
            $initFile = $zula->getDir('themes') . '/' . $themeName . '/init.php';
            if (is_readable($initFile)) {
                include $initFile;
            }
            /**
             * Work out which layout to use with the theme, load all cntrlrs from that
             * and then load the main dispatchers content
             */
            if ($zula->getState() == 'setup') {
                $layout = new Layout($zula->getDir('setup') . '/layout.xml');
            } else {
                $layout = new Layout(Layout::find($requestedUrl->siteType, $router->getRawRequestPath()));
            }
            $theme->loadDispatcher($dispatchContent, $dispatcher);
            $theme->loadLayout($layout);
            $output = $theme;
        }
    } catch (Theme_NoExist $e) {
        Registry::get('log')->message($e->getMessage(), Log::L_WARNING);
        trigger_error('required theme "' . $themeName . '" does not exist', E_USER_WARNING);
        $output = $dispatcher->dispatch($requestedUrl, $dispatchConfig);
    }
} else {
    $output = $dispatcher->dispatch($requestedUrl, $dispatchConfig);
    if ($zula->getMode() == 'cli') {
        // Display a friendly message to stdout
        switch ($dispatcher->getStatusCode()) {
开发者ID:jinshana,项目名称:tangocms,代码行数:31,代码来源:bootstrap.php

示例8: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Layout::find(1)->Elements()->detach();
     //$element_layout = Element_Layout::find($id);
     //$element_layout->delete();
     //return redirect('element_layout');
 }
开发者ID:christengc,项目名称:wheel,代码行数:13,代码来源:Element_LayoutController.php

示例9: getLayoutName

 public static function getLayoutName()
 {
     $id = AppHelper::getLayoutId();
     $layout_name = Layout::find($id);
     return $layout_name->name;
 }
开发者ID:BDMADE,项目名称:laracms,代码行数:6,代码来源:AppHelper.php

示例10: search

 /**
  * search 
  * 
  * @return Response
  */
 public function search()
 {
     $query = Input::get('q');
     $page = Input::get('page');
     $posts = [];
     if ($query) {
         $posts = Post::search($query);
     }
     if (count($posts)) {
         $url = sprintf('/search?q=%s&page=:page', rawurlencode($query));
         $paginator = Paginator::get($posts, $page, $url);
     } else {
         $paginator = null;
     }
     $html = Layout::find('search')->render(['search' => true, 'query' => $query, 'paginator' => $paginator]);
     return Response::make($html);
 }
开发者ID:a11enwong,项目名称:pochika,代码行数:22,代码来源:SiteController.php

示例11: edit

 public function edit($id = null)
 {
     if (is_null($id)) {
         redirect(get_url('page'));
     }
     $page = Page::findById($id);
     if (!$page) {
         Flash::set('error', __('Page not found!'));
         redirect(get_url('page'));
     }
     // check for protected page and editor user
     if (!AuthUser::hasPermission('administrator') && !AuthUser::hasPermission('developer') && $page->is_protected) {
         Flash::set('error', __('You do not have permission to access the requested page!'));
         redirect(get_url('page'));
     }
     // check if trying to save
     if (get_request_method() == 'POST') {
         return $this->_edit($id);
     }
     // find all page_part of this pages
     $page_parts = PagePart::findByPageId($id);
     if (empty($page_parts)) {
         $page_parts = array(new PagePart());
     }
     $tag_array = array();
     foreach ($page->tags() as $tag) {
         $tag_array[] = $tag->name();
     }
     // display things ...
     $this->setLayout('backend');
     $this->display('page/edit', array('action' => 'edit', 'page' => $page, 'tags' => $tag_array, 'filters' => Filter::findAll(), 'behaviors' => Behavior::findAll(), 'page_parts' => $page_parts, 'layouts' => Layout::find(array('order' => 'position'))));
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:32,代码来源:PageController.php

示例12: get_view

 public function get_view()
 {
     $layout = Layout::find($this->layout_id);
     return View::make('user.pricing.view')->with('layout', $layout);
 }
开发者ID:shainmcalindon,项目名称:boothsgardenstudios,代码行数:5,代码来源:pricing.php

示例13: testFindNotFound

 /**
  * @expectedException NotFoundException
  */
 public function testFindNotFound()
 {
     Layout::find('xxx');
 }
开发者ID:a11enwong,项目名称:pochika,代码行数:7,代码来源:LayoutTest.php

示例14: getAuthorName

 public static function getAuthorName()
 {
     $id = AppHelper::getLayoutId();
     $layout = Layout::find($id);
     return $layout->author;
 }
开发者ID:BDMADE,项目名称:laracms,代码行数:6,代码来源:Content.php


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