add ability to get an action description from anywhere

master
Jean-Christian Paul Denis 2023-04-20 15:49:37 +02:00
parent 12039d58fd
commit 3b90162010
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,16 @@ abstract class AbstractCleaner
$this->actions = $actions; $this->actions = $actions;
} }
/**
* Get an action description.
*
* @return null|ActionDescriptor The action descriptor
*/
final public function get(string $id): ?ActionDescriptor
{
return $this->actions[$id] ?? null;
}
/** /**
* Initialize Cleaner properties. * Initialize Cleaner properties.
* *