當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Widget::render方法代碼示例

本文整理匯總了PHP中Widget::render方法的典型用法代碼示例。如果您正苦於以下問題:PHP Widget::render方法的具體用法?PHP Widget::render怎麽用?PHP Widget::render使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Widget的用法示例。


在下文中一共展示了Widget::render方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

 public function render($settings = array(), $force = false)
 {
     $out = parent::render($settings, $force);
     if ($this->show_existing) {
         $out .= sprintf($this->show_existing_template, $this->value());
     }
     return $out;
 }
開發者ID:phpwax,項目名稱:form,代碼行數:8,代碼來源:FileInput.php

示例2: render

 public function render($view, $data = array(), $return = false)
 {
     if (isset($this->blockModel) && isset($this->model)) {
         return parent::render($this->widgetModel->pk.'/'.$view, $data, $return);
     } else {
         return parent::render($view, $data, $return);
     }
 }
開發者ID:nizsheanez,項目名稱:PolymorphCMS,代碼行數:8,代碼來源:ImageGalleryWidget.php

示例3: page

function page()
{
    global $db, $user, $session, $sites;
    /*
         * Lets send a test message to the logged in user
        $message = new Message();
        $message->to(1);
        $message->from(0); //0 will be "system";
        $message->setSubject('This is a second test message');
        $message->setBody("This would be an actual message had this not been a test.");
        $message->send();
    */
    print "Set site is " . $session->current_site;
    ?>
    <h3>Dashboard</h3>
    <section id="widget-grid" class="">

            <!-- row -->
            <div class="row">
                <article class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                    <?php 
    $test = new Widget();
    $test->setTitle('My first widget');
    $action2 = array('label' => 'Test', 'url' => '/pages/user/users.php', 'class' => 'danger');
    $test->setActions($action2);
    $actions = array('label' => 'Users', 'subitems' => array(array('label' => 'Users2', 'url' => '/pages/user/users.php'), array('label' => 'Users3', 'url' => '/pages/user/users.php')));
    $test->setActions($actions);
    $test->render();
    $test2 = new Widget();
    $test2->setTitle('My second widget');
    $headers = array('First Name', 'Last Name');
    $data = $db->select('firstname,lastname')->from('users')->limit(10)->fetch();
    $test2->addTable($headers, $data);
    $test2->render();
    print "Cookies<br>";
    if (isset($_COOKIE)) {
        foreach ($_COOKIE as $name => $value) {
            $name = htmlspecialchars($name);
            $value = htmlspecialchars($value);
            echo "{$name} : {$value} <br />\n";
        }
    }
    ?>
                </article>

                <article class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                    <?php 
    $test3 = new Widget();
    $test3->setTitle('My third widget');
    $test3->addContent("<p>Sites allowed:</p>" . $user->sites('list'));
    $test3->render();
    ?>
                </article>
            </div>
        </section>

    <?php 
}
開發者ID:Pioneer-Web-Development,項目名稱:MangoV2,代碼行數:58,代碼來源:dashboard.php

示例4: load

 /**
  * Factory method
  *
  *     // Request widget by path: /blog/widget/recent/index?sort=title&limit=10
  *     echo Widget::load('blog', 'recent', null, ['sort' => 'title', 'limit' => 10]);
  *
  * @param string $module module name without prefix cms_
  * @param string $controller controller name
  * @param string $action action name (default index)
  * @param array $query array of query parameters
  * @return Response
  */
 public static function load($module, $controller, $action = null, array $query = null)
 {
     $widget = new Widget($module, $controller, $action, $query);
     return $widget->render();
 }
開發者ID:eok8177,項目名稱:shopCMS,代碼行數:17,代碼來源:Widget.php

示例5: load

 public static function load($widget_name, array $params = NULL, $route_name = NULL)
 {
     $widget = new Widget($widget_name, $params, $route_name);
     return $widget->render();
 }
開發者ID:ruslankus,項目名稱:invoice-crm,代碼行數:5,代碼來源:Widget.php


注:本文中的Widget::render方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。