hasFeature() public méthode

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).
Résultat boolean True if the application has the feature.
Exemple #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];
 }