The list where the item is part of */ protected $list; protected $tag = 'li'; protected $defaultAttributes = ['class' => 'table-row']; /** * Create a new table row item * * @param Item $item * @param ItemTable $table */ public function __construct($item, ItemTable $table) { $this->item = $item; $this->list = $table; } protected function assemble() { $layout = $this->list->getItemLayout($this->item); $this->addAttributes($layout->getAttributes()); $this->addHtml($layout); } }