/**
  * Default method for your controller. Render widget and return
  * @access public
  *
  */
 public function indexAction($id)
 {
     $users = array();
     //$users = User::all();
     return Widget::make('admin:user', function ($widget) {
         return $widget->render(true);
         // If you pass true Widget will understand you are trying to access widget
     }, array('greet' => 'Hello! Widget'));
 }
 /**
  * Default method for your controller. Render widget and return
  * @access public
  *
  */
 public function indexAction()
 {
     $users = array();
     //$users = User::all();
     return Widget::make('Acme:user', ['greet' => 'Hello! Widget'], function ($w) {
         /*
         | If you pass true for render method Widget
         | will understand you are trying to access module widget
         */
         return $w->render(true);
     });
 }
Пример #3
0
 public function testDataSetOnWidgetView()
 {
     $widget = Widget::make('foo_bar', ['foo' => 'bar', 'bar' => 'baz'], function ($w) {
         return $w;
     });
     $this->assertEquals('bar', $widget['foo']);
     $this->assertEquals('baz', $widget['bar']);
     $this->assertEquals(['foo' => 'bar', 'bar' => 'baz'], $widget->getData());
     $widget = Widget::make('foo_bar', [], function ($w) {
         $w['var'] = 'user';
         return $w;
     });
     $widget['foobaz'] = 'Foo Baz';
     $this->assertEquals(['var' => 'user', 'foobaz' => 'Foo Baz'], $widget->getData());
 }
            padding: 60px 0;
        }
    </style>
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body>

<!-- Fluid Container -->
<div class='container'>

    <!-- Navbar -->
    <?php 
echo Widget::make('layout:widget:navbar');
?>
    <!-- ./ Navbar -->

    <!-- Content -->
    <?php 
echo $yield;
?>
    <!-- ./ Content -->

    <!-- Footer -->
    <footer class="clearfix"></footer>
    <!-- ./ Footer -->

</div>
<!-- ./ Container End -->
Пример #5
0
 /**
  * Default method for your controller. Render widget and return
  * @access public
  *
  */
 public function indexAction($id)
 {
     $users = array();
     //$users = User::all();
     return Widget::make('modules::admin::user', array('msg' => 'Hello! Widget', 'users' => $users));
 }
Пример #6
0
 public function showMoreAction()
 {
     $value = $this->input->post('limit');
     if (isset($value)) {
         // more posting paging
         $result = FacebookPosts::all(array('orderBy' => 'p_id desc', 'limit' => "{$value}, 8"));
     }
     if (count($result) > 0) {
         $widgetComment = Widget::make('comment::widget::comment', array('posts' => $result, 'link' => $this->link));
         $reponse = array('posts' => $widgetComment, "count" => 8);
     } else {
         $reponse = array('posts' => '', "count" => 8);
     }
     echo json_encode($reponse);
     exit;
 }