Nwidart\Modules\Module::isStatus PHP Method

isStatus() public method

Determine whether the given status same with the current module status.
public isStatus ( $status ) : boolean
$status
return boolean
    public function isStatus($status)
    {
        return $this->get('active', 0) === $status;
    }

Usage Example

Example #1
0
 /** @test */
 public function it_module_status_check()
 {
     $this->assertTrue($this->module->isStatus(1));
     $this->assertFalse($this->module->isStatus(0));
 }