Skip to content

Commit

Permalink
BaseTableRowItem: Make $table param mandantory for constructor
Browse files Browse the repository at this point in the history
The $table param was only nullable for the header in the detail view, which does not have a table.
Now these headers are rendered with other classes, so the parameter should not be nullable now.
  • Loading branch information
sukhwinder33445 committed Dec 5, 2024
1 parent e880e10 commit 5d5d9a7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Common/BaseTableRowItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class BaseTableRowItem extends BaseHtmlElement
/** @var object The associated list item */
protected $item;

/** @var ?BaseItemTable The list where the item is part of */
/** @var BaseItemTable The list where the item is part of */
protected $table;

protected $tag = 'li';
Expand All @@ -25,17 +25,13 @@ abstract class BaseTableRowItem extends BaseHtmlElement
* Create a new table row item
*
* @param object $item
* @param BaseItemTable|null $table
* @param BaseItemTable $table
*/
public function __construct($item, BaseItemTable $table = null)
public function __construct($item, BaseItemTable $table)
{
$this->item = $item;
$this->table = $table;

if ($table === null) {
$this->setTag('div');
}

$this->addAttributes($this->baseAttributes);

$this->init();
Expand Down

0 comments on commit 5d5d9a7

Please sign in to comment.