Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/3219' into develop
Browse files Browse the repository at this point in the history
Close #3219
  • Loading branch information
weierophinney committed Dec 13, 2012
2 parents 0a2f2c1 + 2b7cf66 commit c4f5bc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions library/Zend/Form/Factory.php
Expand Up @@ -16,7 +16,6 @@
use Zend\InputFilter\InputFilterInterface;
use Zend\Stdlib\ArrayUtils;
use Zend\Stdlib\Hydrator;
use Zend\Stdlib\InitializableInterface;

/**
* @category Zend
Expand Down Expand Up @@ -217,11 +216,6 @@ public function configureElement(ElementInterface $element, $spec)
$element->setAttributes($attributes);
}

// Hook to perform stuff, once all the configuration work has been done
if ($element instanceof InitializableInterface) {
$element->init();
}

return $element;
}

Expand Down
6 changes: 6 additions & 0 deletions library/Zend/Form/FormElementManager.php
Expand Up @@ -12,6 +12,7 @@

use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\ConfigInterface;
use Zend\Stdlib\InitializableInterface;

/**
* Plugin manager implementation for form elements.
Expand Down Expand Up @@ -102,6 +103,11 @@ public function injectFactory($element)
*/
public function validatePlugin($plugin)
{
// Hook to perform various initialization, when the element is not created through the factory
if ($plugin instanceof InitializableInterface) {
$plugin->init();
}

if ($plugin instanceof ElementInterface) {
return; // we're okay
}
Expand Down

0 comments on commit c4f5bc2

Please sign in to comment.