Skip to content

Commit

Permalink
Make some list marker properties protected
Browse files Browse the repository at this point in the history
  • Loading branch information
rengaw83 committed Apr 6, 2022
1 parent e197b25 commit 5ef9eba
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 9 deletions.
16 changes: 16 additions & 0 deletions Classes/Frontend/Marker/ListBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ public function __construct(ListBuilderInfo $info = null)
}
}

/**
* @return ListBuilderInfo
*/
protected function getInfo()
{
return $this->info;
}

/**
* Add a visitor callback. It is called for each item before rendering.
*
Expand All @@ -68,6 +76,14 @@ public function addVisitor(array $callback)
$this->visitors[] = $callback;
}

/**
* @return array
*/
protected function getVisitors()
{
return $this->visitors;
}

public function renderEach(IListProvider $provider, $viewData, $template, $markerClassname, $confId, $marker, $formatter, $markerParams = null)
{
$viewData = is_object($viewData) ? $viewData : new ArrayObject();
Expand Down
43 changes: 34 additions & 9 deletions Classes/Frontend/Marker/ListMarker.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ class ListMarker
private $template;
private $formatter;
private $visitors;
private $confId;
private $rowRoll;
private $rowRollCnt;
private $i;
private $parts;
private $totalLineStart;
private $offset;
private $marker;
private $entryMarker;

protected $confId;
protected $rowRoll;
protected $rowRollCnt;
protected $i;
protected $parts;
protected $totalLineStart;
protected $offset;
protected $marker;
protected $entryMarker;

public function __construct(ListMarkerInfo $listMarkerInfo = null)
{
Expand All @@ -56,6 +57,22 @@ public function __construct(ListMarkerInfo $listMarkerInfo = null)
}
}

/**
* @return ListBuilderInfo
*/
protected function getInfo()
{
return $this->info;
}

/**
* @return FormatUtil
*/
protected function getFormatter()
{
return $this->formatter;
}

/**
* Add a visitor callback. It is called for each item before rendering.
*
Expand All @@ -66,6 +83,14 @@ public function addVisitors(array $visitors)
$this->visitors = $visitors;
}

/**
* @return array
*/
protected function getVisitors()
{
return $this->visitors;
}

/**
* @param IListProvider $provider
* @param string $template
Expand Down

0 comments on commit 5ef9eba

Please sign in to comment.