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


PHP Toolbar::render方法代码示例

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


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

示例1: testRender

 /**
  * @covers Fabfuel\Prophiler\Toolbar::__construct
  * @covers Fabfuel\Prophiler\Toolbar::render
  * @uses Fabfuel\Prophiler\Toolbar
  * @uses Fabfuel\Prophiler\Iterator\ComponentFilteredIterator
  * @uses Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter
  */
 public function testRender()
 {
     $profiler = $this->getMock('Fabfuel\\Prophiler\\ProfilerInterface');
     $profiler->expects($this->exactly(2))->method('getDuration')->willReturn(1);
     $toolbar = new Toolbar($profiler);
     $output = $toolbar->render();
     $this->assertRegExp('/1000 ms/', $output);
 }
开发者ID:tresemece,项目名称:monte,代码行数:15,代码来源:ToolbarTest.php

示例2: display

 /**
  * Display module contents
  *
  * @return  void
  */
 public function display()
 {
     if (!\App::isAdmin()) {
         return;
     }
     // Get the toolbar.
     $toolbar = \Toolbar::render('toolbar');
     // Get the view
     require $this->getLayoutPath($this->params->get('layout', 'default'));
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:15,代码来源:helper.php

示例3: testRender

 /**
  * @covers Fabfuel\Prophiler\Toolbar::__construct
  * @covers Fabfuel\Prophiler\Toolbar::render
  * @uses Fabfuel\Prophiler\Toolbar
  * @uses Fabfuel\Prophiler\Iterator\ComponentFilteredIterator
  * @uses Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter
  */
 public function testRender()
 {
     $profiler = $this->getMockBuilder('Fabfuel\\Prophiler\\Profiler')->disableOriginalConstructor()->getMock();
     $profiler->expects($this->exactly(2))->method('getDuration')->willReturn(100);
     $toolbar = new Toolbar($profiler);
     $dispatcher = $this->getMockBuilder('Phalcon\\Mvc\\Dispatcher')->getMock();
     $toolbar->dispatcher = $dispatcher;
     $output = $toolbar->render();
     $this->assertNotEmpty($output);
 }
开发者ID:stanislav-web,项目名称:phalcon-development,代码行数:17,代码来源:ToolbarTest.php

示例4: render

 public function render()
 {
     if (count($this->listFields) > 0) {
         $fieldNames = $this->listFields;
     } else {
         $fieldNames = $this->getDefaultFieldNames();
     }
     foreach ($fieldNames as $i => $fieldName) {
         $fieldNames[$i] = substr($fieldName, 0, 1) == "." ? $this->redirectedPackage . $fieldName : $fieldName;
     }
     $this->setupList();
     $params["fields"] = $fieldNames;
     $params["page"] = 0;
     $params["sort_field"] = array(array("field" => end(explode('.', reset($fieldNames))), "type" => "DESC"));
     $params['hardConditions'] = $this->listConditions;
     $this->table->setParams($params);
     return $this->toolbar->render() . $this->table->render();
 }
开发者ID:ekowabaka,项目名称:cfx,代码行数:18,代码来源:MCListView.php

示例5: getContents

 /**
  * Default controller action. This is the default action which is executed
  * when no action is specified for a given call.
  * @see lib/controllers/Controller::getContents()
  */
 public function getContents()
 {
     if (count($this->listFields) > 0) {
         $fieldNames = $this->listFields;
     } else {
         if ($this->app != null) {
             $fieldNames = $this->app->xpath("/app:app/app:list/app:field");
             $concatenatedLabels = $this->app->xpath("/app:app/app:list/app:field/@label");
         } else {
             $fieldNames = array();
             $keyField = $this->model->getKeyField();
             $fieldNames[$keyField] = "{$this->model->package}.{$keyField}";
             $fields = $this->model->getFields();
             foreach ($fields as $i => $field) {
                 if ($field["reference"] == "") {
                     $fieldNames[$i] = $this->model->package . "." . $field["name"];
                 } else {
                     $modelInfo = Model::resolvePath($field["reference"]);
                     $fieldNames[$i] = $modelInfo["model"] . "." . $field["referenceValue"];
                 }
             }
         }
     }
     foreach ($fieldNames as $i => $fieldName) {
         $fieldNames[$i] = substr((string) $fieldName, 0, 1) == "." ? $this->redirectedPackage . (string) $fieldName : (string) $fieldName;
     }
     if (count($this->fieldNames) > 0) {
         $fieldNames = $this->fieldNames;
     }
     if ($this->apiMode === false) {
         $this->setupList();
         $params["fields"] = $fieldNames;
         $params["page"] = 0;
         $params["sort_field"] = array(array("field" => $this->model->database . "." . $this->model->getKeyField(), "type" => "DESC"));
         $this->table->setParams($params);
         $return = '<div id="table-wrapper">' . $this->toolbar->render() . $this->table->render() . '</div>';
     } else {
         $params["fields"] = $fieldNames;
         $params["page"] = 0;
         $params["sort_field"] = array(array("field" => $this->model->database . "." . $this->model->getKeyField(), "type" => "DESC"));
         $return = json_encode(SQLDBDataStore::getMulti($params));
     }
     return $return;
 }
开发者ID:rocksyne,项目名称:wyf,代码行数:49,代码来源:ModelController.php

示例6: defined

<?php

defined('_EXE') or die('Restricted access');
?>

<?php 
Toolbar::addTitle("Parrilla", "glyphicon-star");
//Export button
Toolbar::addButton(array("title" => "Exportar", "app" => "parrilla", "action" => "export", "class" => "primary", "spanClass" => "share-alt", "noAjax" => true));
Toolbar::render();
?>

<form method="post" name="mainForm" id="mainForm" action="<?php 
echo Url::site();
?>
" class="form-horizontal" role="form" autocomplete="off">
    <input type="hidden" name="app" id="app" value="parrilla">
    <input type="hidden" name="action" id="action" value="export">

    <div class="form-group">
        <label for="fecha" class="col-sm-2 control-label">
            Fecha
        </label>
        <div class="col-sm-3">
            <input type="text" name="fecha" class="form-control" id="fecha" value="<?php 
echo date("d-m-Y");
?>
" placeholder="Fecha">
        </div>
        <div class="col-sm-3">
            <input type="text" name="hour" class="form-control hourMask" id="hour" value="07:00" placeholder="Hora">
开发者ID:flafuente,项目名称:parrillas,代码行数:31,代码来源:parrilla.view.php


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