/**
  * Render a checkbox list base on the subset and superset collections.
  *
  * @param string $relationId the relationship id, used to render the form field key.
  * @param BaseCollection[]   the related collection. (optional)
  * @param BaseCollection[]   the superset collection.
  */
 public function renderList($relationId, $subset, $superset)
 {
     $ul = new Element('ul');
     $ul->addClass('actionkit-checkbox-view');
     // now we should render the superset, and set the checkbox to be
     // connected from the $this->checked array.
     foreach ($superset as $item) {
         $li = $this->renderItem($relationId, $subset, $item, isset($this->checked[$item->id]));
         $li->appendTo($ul);
     }
     return $ul;
 }
Beispiel #2
0
 public function createContainer()
 {
     $container = new Element('div');
     $container->addClass('__region');
     return $container;
 }
Beispiel #3
0
 public function createContainerElement()
 {
     $el = new Element('div');
     $el->addClass('__region');
     return $el;
 }