Skip to content

Commit

Permalink
make hasRequest part of the AdminInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Jul 26, 2013
1 parent 82061cd commit 538a8f8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2160,8 +2160,7 @@ public function getRequest()
}

/**
*
* @return boolean true if the request object is linked to the Admin
* {@inheritdoc}
*/
public function hasRequest()
{
Expand Down
8 changes: 8 additions & 0 deletions Admin/AdminInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,17 @@ public function getFormFieldDescription($name);

/**
* @return \Symfony\Component\HttpFoundation\Request
*
* @throws \RuntimeException if no request is set.
*/
public function getRequest();

/**
* @return boolean true if a request object is linked to this Admin, false
* otherwise.
*/
public function hasRequest();

/**
*
* @return string
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ CHANGELOG
public function alterNewInstance(AdminInterface $admin, $object)
{}

* [BC BREAK] added hasRequest to the AdminInterface
If you do not extend the Admin class, you need to add a hasRequest method to
your admin like this (depending on how you handle the request you return in
getRequest:

public function hasRequest()
{
return null !== $this->request;
}

### 2013-07-05

* Remove qTip
Expand Down

0 comments on commit 538a8f8

Please sign in to comment.