Example #1
0
 /**
  * {@inheritdoc}
  *
  * @since 4.8.1
  */
 protected function _getEventPrefix($name = null)
 {
     $prefix = $this->hasData('event_prefix') ? $this->getData('event_prefix') : ($code = $this->getCode()) ? sprintf('%1$s_', $code) : '';
     return string_had_prefix($name, $this->getPrefixOverride()) ? $name : "{$prefix}{$name}";
 }
Example #2
0
 /**
  *
  * @since 4.8.1
  * @param string $string The string to check.
  * @return bool True if the string had a prefix override, and it was removed;
  *  false otherwise;
  */
 public static function stringHadPrefix(&$string)
 {
     return string_had_prefix($string, static::PREFIX_OVERRIDE);
 }