Neos\Flow\Package\Package::isProtected PHP Метод

isProtected() публичный Метод

Tells if this package is protected and therefore cannot be deactivated or deleted
public isProtected ( ) : boolean
Результат boolean
    public function isProtected()
    {
        return $this->protected;
    }

Usage Example

 /**
  * @test
  */
 public function aPackageCanBeFlaggedAsProtected()
 {
     $packagePath = 'vfs://Packages/Application/Vendor/Dummy/';
     mkdir($packagePath, 0700, true);
     file_put_contents($packagePath . 'composer.json', '{"name": "vendor/dummy", "type": "flow-test"}');
     $package = new Package('Vendor.Dummy', 'vendor/dummy', $packagePath);
     $this->assertFalse($package->isProtected());
     $package->setProtected(true);
     $this->assertTrue($package->isProtected());
 }