public function StylesDefault::pushEffect in Styles 7.2
2 calls to StylesDefault::pushEffect()
- FileStyles::render in contrib/
file_styles/ includes/ styles/ FileStyles.inc - Override the render function to always display a thumbnail in the wysiwyg.
- StylesDefault::addEffect in includes/
Styles.inc - Add an effect to the end of the array.
File
- includes/
Styles.inc, line 189 - Styles.inc Base class for Styles.
Class
- StylesDefault
- @file Styles.inc Base class for Styles.
Code
public function pushEffect($effect) {
$effectName = $effect['name'];
if (method_exists($this, $effectName)) {
$effects = $this
->getEffects();
array_push($effects, $effect);
return $this
->setEffects($effects);
}
else {
$variables = $this
->getVariables();
$styleName = $variables['style']['label'];
watchdog('styles', 'Effect %effect_name not found for %style_name display formatter style of the %class_name class.', array(
'%effect_name' => $effectName,
'%style_name' => $styleName,
'%class_name' => $this
->getClassName(),
), WATCHDOG_WARNING);
}
}