hasFeature() public method

Does the application have the queried feature?
public hasFeature ( string $id, string $app = null ) : boolean
$id string Feature ID.
$app string The application to check (defaults to current app).
return boolean True if the application has the feature.
Ejemplo n.º 1
0
 /**
  * Return if the backend collection has the requested feature.
  *
  * @param string $feature     The requested feature.
  * @param string $collection  The requested collection id.
  *
  * @return boolean
  * @since 2.6.0
  */
 public function hasFeature($feature, $collection)
 {
     if (empty($this->_capabilities[$collection]) || !array_key_exists($feature, $this->_capabilities[$collection])) {
         $this->_capabilities[$collection][$feature] = $this->_registry->hasFeature($feature, $this->_getAppFromCollectionId($collection));
     }
     return $this->_capabilities[$collection][$feature];
 }