public static function RulesExtendable::itemFacesAs in Rules 7.2
Returns whether the a RuleExtendable supports the given interface.
Parameters
$itemInfo: The info about the item as specified in the hook.
$interface: The interface to check for.
Return value
bool Whether it supports the given interface.
File
- includes/
rules.core.inc, line 424 - Rules base classes and interfaces needed for any rule evaluation.
Class
- RulesExtendable
- Base class for RulesExtendables.
Code
public static function itemFacesAs(&$itemInfo, $interface) {
return in_array($interface, class_implements($itemInfo['class'])) || isset($itemInfo['faces_cache'][2][$interface]);
}