Refs #599 - Adds method to get the list widget object from the controller

This commit is contained in:
Sam Georges 2014-10-11 18:06:14 +11:00
parent 153fcfbb13
commit dd5a46d815
1 changed files with 12 additions and 0 deletions

View File

@ -260,6 +260,18 @@ class ListController extends ControllerBehavior
return $this->listWidgets[$definition]->onRefresh();
}
/**
* Returns the widget used by this behavior.
* @return Backend\Classes\WidgetBase
*/
public function listGetWidget($definition = null)
{
if (!$definition)
$definition = $this->primaryDefinition;
return array_get($this->listWidgets, $definition);
}
//
// Overrides
//