Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/Helper/Navigation/AbstractHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ public function setAcl(Acl\Acl $acl = null)
*/
public function getAcl()
{
if ($this->acl === null && self::$defaultAcl !== null) {
return self::$defaultAcl;
if ($this->acl === null && static::$defaultAcl !== null) {
return static::$defaultAcl;
}

return $this->acl;
Expand Down Expand Up @@ -380,8 +380,8 @@ public function setRole($role = null)
*/
public function getRole()
{
if ($this->role === null && self::$defaultRole !== null) {
return self::$defaultRole;
if ($this->role === null && static::$defaultRole !== null) {
return static::$defaultRole;
}

return $this->role;
Expand Down Expand Up @@ -850,7 +850,7 @@ protected function normalizeId($value)
*/
public static function setDefaultAcl(Acl\Acl $acl = null)
{
self::$defaultAcl = $acl;
static::$defaultAcl = $acl;
}

/**
Expand All @@ -869,7 +869,7 @@ public static function setDefaultRole($role = null)
|| is_string($role)
|| $role instanceof Acl\Role\RoleInterface
) {
self::$defaultRole = $role;
static::$defaultRole = $role;
} else {
throw new Exception\InvalidArgumentException(sprintf(
'$role must be null|string|Zend\Permissions\Role\RoleInterface; received "%s"',
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/Navigation/Links.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ public function findAllRelations(AbstractPage $page, $flag = null)
}

$result = array('rel' => array(), 'rev' => array());
$native = array_values(self::$RELATIONS);
$native = array_values(static::$RELATIONS);

foreach (array_keys($result) as $rel) {
$meth = 'getDefined' . ucfirst($rel);
$types = array_merge($native, array_diff($page->$meth(), $native));

foreach ($types as $type) {
if (!$relFlag = array_search($type, self::$RELATIONS)) {
if (!$relFlag = array_search($type, static::$RELATIONS)) {
$relFlag = self::RENDER_CUSTOM;
}
if (!($flag & $relFlag)) {
Expand Down
14 changes: 7 additions & 7 deletions src/Helper/PaginationControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PaginationControl extends AbstractHelper
*/
public static function setDefaultViewPartial($partial)
{
self::$defaultViewPartial = $partial;
static::$defaultViewPartial = $partial;
}

/**
Expand All @@ -51,7 +51,7 @@ public static function setDefaultViewPartial($partial)
*/
public static function getDefaultViewPartial()
{
return self::$defaultViewPartial;
return static::$defaultViewPartial;
}

/**
Expand All @@ -61,7 +61,7 @@ public static function getDefaultViewPartial()
*/
public static function getDefaultScrollingStyle()
{
return self::$defaultScrollingStyle;
return static::$defaultScrollingStyle;
}

/**
Expand All @@ -71,7 +71,7 @@ public static function getDefaultScrollingStyle()
*/
public static function setDefaultScrollingStyle($style)
{
self::$defaultScrollingStyle = $style;
static::$defaultScrollingStyle = $style;
}

/**
Expand All @@ -98,15 +98,15 @@ public function __invoke(Paginator\Paginator $paginator = null, $scrollingStyle
}

if ($partial === null) {
if (self::$defaultViewPartial === null) {
if (static::$defaultViewPartial === null) {
throw new Exception\RuntimeException('No view partial provided and no default set');
}

$partial = self::$defaultViewPartial;
$partial = static::$defaultViewPartial;
}

if ($scrollingStyle === null) {
$scrollingStyle = self::$defaultScrollingStyle;
$scrollingStyle = static::$defaultScrollingStyle;
}

$pages = get_object_vars($paginator->getPages($scrollingStyle));
Expand Down

0 comments on commit d28282e

Please sign in to comment.