Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed Oct 12, 2017
2 parents 60b1284 + 075cc36 commit bb70ba9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
3 changes: 3 additions & 0 deletions _config/model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ SilverStripe\Core\Injector\Injector:
class: SilverWare\ORM\FieldType\DBDimensions
Viewports:
class: SilverWare\ORM\FieldType\DBViewports
SilverWare\Extensions\Lists\ListSourceExtension:
class: SilverWare\Extensions\Lists\ListSourceExtension
type: prototype

# Configure Fixture Factory:

Expand Down
13 changes: 3 additions & 10 deletions src/Extensions/Lists/ListItemExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ class ListItemExtension extends Extension
*/
const DEFAULT_LIST_ITEM_TEMPLATE = 'SilverWare\Lists\ListItem';

/**
* Holds the component instance responsible for rendering the extended object.
*
* @var Component
*/
protected $renderer;

/**
* Defines the value of the renderer attribute.
*
Expand All @@ -60,7 +53,7 @@ class ListItemExtension extends Extension
*/
public function setRenderer(Component $renderer)
{
$this->renderer = $renderer;
$this->owner->setField('renderer', $renderer);

return $this;
}
Expand All @@ -72,7 +65,7 @@ public function setRenderer(Component $renderer)
*/
public function getRenderer()
{
return $this->renderer;
return $this->owner->getField('renderer');
}

/**
Expand Down Expand Up @@ -124,7 +117,7 @@ public function getListItemClassNames()
$classes,
ViewTools::singleton()->getAncestorClassNames(
$this->owner,
$this->ownerBaseClass
$this->owner->baseClass()
)
);

Expand Down
4 changes: 3 additions & 1 deletion src/Extensions/Lists/ListViewExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ public function getListClassOptions()
*/
public function getListObject()
{
$this->owner->flushCache();

return $this->owner->getComponent('ListObject');
}

Expand Down Expand Up @@ -748,7 +750,7 @@ protected function getListOptionFields()
*
* @return FieldList
*/
public function hideFields(FieldList $fields)
protected function hideFields(FieldList $fields)
{
if ($this->owner->ListInherit) {

Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/StyleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function apply()
*
* @return boolean
*/
public function hasAppliedStyles()
protected function hasAppliedStyles()
{
return is_array($this->getAppliedStyles());
}
Expand Down

0 comments on commit bb70ba9

Please sign in to comment.