Exemplo n.º 1
0
 /**
  * @return Iterator
  */
 public function getInnerIterator()
 {
     if (null === $this->data) {
         $this->data = clone $this->table->getData();
     }
     return $this->data;
 }
Exemplo n.º 2
0
 /**
  * @return View\Table
  */
 public function getTable1()
 {
     $data = new ArrayObject([['key' => 1, 'other' => 'abc', 'value' => 'A'], ['key' => 2, 'other' => 'def', 'value' => 'B'], ['key' => 3, 'other' => 'ghi', 'value' => 'C']]);
     $table = new Util\Table($data);
     $table->addColumn(['name' => 'key', 'label' => 'Key'])->addColumn(['name' => 'value', 'label' => 'Value'])->addColumn(['name' => 'auto', 'label' => 'Auto', 'filter' => function ($v, $r) {
         return $r['other'] . ':' . $r['value'];
     }]);
     return $table;
 }