Elgg\ActionsService::exists PHP Méthode

exists() public méthode

See also: elgg_action_exists
public exists ( $action )
    public function exists($action)
    {
        return isset($this->actions[$action]) && file_exists($this->actions[$action]['file']);
    }

Usage Example

Exemple #1
0
 public function testActionsAccessLevels()
 {
     $this->assertFalse($this->actions->exists('test/output'));
     $this->assertFalse($this->actions->exists('test/not_registered'));
     $this->assertTrue($this->actions->register('test/output', "{$this->actionsDir}/output.php", 'public'));
     $this->assertTrue($this->actions->register('test/output_logged_in', "{$this->actionsDir}/output.php", 'logged_in'));
     $this->assertTrue($this->actions->register('test/output_admin', "{$this->actionsDir}/output.php", 'admin'));
 }