Skip to content

Commit

Permalink
first round of review
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Aug 11, 2020
1 parent 6e289ae commit 05d850f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Admin/AbstractAdmin.php
Expand Up @@ -1749,6 +1749,8 @@ public function isCurrentChild(): bool

/**
* Returns the current child admin instance.
*
* @return AdminInterface|null the current child admin instance
*/
public function getCurrentChildAdmin(): ?AdminInterface
{
Expand Down
3 changes: 3 additions & 0 deletions src/Admin/AdminInterface.php
Expand Up @@ -135,6 +135,9 @@ public function getSecurityInformation(): array;

public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription): void;

/**
* @throws \LogicException
*/
public function getParentFieldDescription(): FieldDescriptionInterface;

/**
Expand Down
9 changes: 7 additions & 2 deletions src/Mapper/BaseMapper.php
Expand Up @@ -51,7 +51,10 @@ abstract public function get(string $key);

abstract public function has(string $key): bool;

abstract public function remove(string $key): self;
/**
* @return static
*/
abstract public function remove(string $key);

/**
* Returns configured keys.
Expand All @@ -62,6 +65,8 @@ abstract public function keys(): array;

/**
* @param string[] $keys field names
*
* @return static
*/
abstract public function reorder(array $keys): self;
abstract public function reorder(array $keys);
}
4 changes: 2 additions & 2 deletions src/Show/ShowMapper.php
Expand Up @@ -107,7 +107,7 @@ public function has(string $key): bool
return $this->list->has($key);
}

public function remove(string $key): BaseMapper
public function remove(string $key): self
{
$this->admin->removeShowFieldDescription($key);
$this->list->remove($key);
Expand Down Expand Up @@ -160,7 +160,7 @@ final public function keys(): array
return array_keys($this->list->getElements());
}

public function reorder(array $keys): BaseMapper
public function reorder(array $keys): self
{
$this->admin->reorderShowGroup($this->getCurrentGroupName(), $keys);

Expand Down

0 comments on commit 05d850f

Please sign in to comment.