Source for file ImgRequired.php
Documentation is available at ImgRequired.php
// must be called POST validation
* Transform that supplies default values for the src and alt attributes
* in img tags, as well as prevents the img tag from being removed
* because of a missing alt tag. This needs to be registered as both
* a pre and post attribute transform.
public function transform($attr, $config, $context) {
if (!isset
($attr['src'])) {
if ($config->get('Core', 'RemoveInvalidImg')) return $attr;
$attr['src'] =
$config->get('Attr', 'DefaultInvalidImage');
if (!isset
($attr['alt'])) {
$attr['alt'] =
$config->get('Attr', 'DefaultInvalidImageAlt');
Documentation generated on Thu, 19 Jun 2008 18:49:37 -0400 by phpDocumentor 1.4.2