/opt/alt/php54/usr/share/pear/Symfony/Component/Form
NameSizeModeActions
Exception/-0755rm
Extension/-0755rm
Guess/-0755rm
Resources/-0755rm
Test/-0755rm
Util/-0755rm
AbstractExtension.php48850644editdlrm
AbstractRendererEngine.php76340644editdlrm
AbstractType.php10800644editdlrm
AbstractTypeExtension.php9930644editdlrm
autoloader.php3340644editdlrm
Button.php88260644editdlrm
ButtonBuilder.php185230644editdlrm
ButtonTypeInterface.php4620644editdlrm
CallbackTransformer.php21380644editdlrm
ClickableInterface.php5590644editdlrm
DataMapperInterface.php11300644editdlrm
DataTransformerInterface.php31590644editdlrm
Form.php348650644editdlrm
FormBuilder.php78710644editdlrm
FormBuilderInterface.php23350644editdlrm
FormConfigBuilder.php216800644editdlrm
FormConfigBuilderInterface.php86660644editdlrm
FormConfigInterface.php64370644editdlrm
FormError.php25630644editdlrm
FormEvent.php12470644editdlrm
FormEvents.php11400644editdlrm
FormExtensionInterface.php16680644editdlrm
FormFactory.php52250644editdlrm
FormFactoryBuilder.php36090644editdlrm
FormFactoryBuilderInterface.php30580644editdlrm
FormFactoryInterface.php42440644editdlrm
FormInterface.php83280644editdlrm
FormRegistry.php47530644editdlrm
FormRegistryInterface.php14420644editdlrm
FormRenderer.php119540644editdlrm
FormRendererEngineInterface.php70630644editdlrm
FormRendererInterface.php32790644editdlrm
Forms.php58990644editdlrm
FormTypeExtensionInterface.php21250644editdlrm
FormTypeGuesserChain.php28800644editdlrm
FormTypeGuesserInterface.php21700644editdlrm
FormTypeInterface.php32220644editdlrm
FormView.php35240644editdlrm
NativeRequestHandler.php56120644editdlrm
PreloadedExtension.php23170644editdlrm
RequestHandlerInterface.php6680644editdlrm
ResolvedFormType.php76620644editdlrm
ResolvedFormTypeFactory.php6580644editdlrm
ResolvedFormTypeFactoryInterface.php13020644editdlrm
ResolvedFormTypeInterface.php33070644editdlrm
ReversedTransformer.php12560644editdlrm
SubmitButton.php11370644editdlrm
SubmitButtonBuilder.php6240644editdlrm
SubmitButtonTypeInterface.php4740644editdlrm
Edit: /opt/alt/php54/usr/share/pear/Symfony/Component/Form/Button.php (8826B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form; use Symfony\Component\Form\Exception\AlreadySubmittedException; use Symfony\Component\Form\Exception\BadMethodCallException; /** * A form button. * * @author Bernhard Schussek */ class Button implements \IteratorAggregate, FormInterface { /** * @var FormInterface|null */ private $parent; /** * @var FormConfigInterface */ private $config; /** * @var Boolean */ private $submitted = false; /** * Creates a new button from a form configuration. * * @param FormConfigInterface $config The button's configuration. */ public function __construct(FormConfigInterface $config) { $this->config = $config; } /** * Unsupported method. * * @param mixed $offset * * @return Boolean Always returns false. */ public function offsetExists($offset) { return false; } /** * Unsupported method. * * This method should not be invoked. * * @param mixed $offset * * @throws BadMethodCallException */ public function offsetGet($offset) { throw new BadMethodCallException('Buttons cannot have children.'); } /** * Unsupported method. * * This method should not be invoked. * * @param mixed $offset * @param mixed $value * * @throws BadMethodCallException */ public function offsetSet($offset, $value) { throw new BadMethodCallException('Buttons cannot have children.'); } /** * Unsupported method. * * This method should not be invoked. * * @param mixed $offset * * @throws BadMethodCallException */ public function offsetUnset($offset) { throw new BadMethodCallException('Buttons cannot have children.'); } /** * {@inheritdoc} */ public function setParent(FormInterface $parent = null) { $this->parent = $parent; } /** * {@inheritdoc} */ public function getParent() { return $this->parent; } /** * Unsupported method. * * This method should not be invoked. * * @param int|string|FormInterface $child * @param null $type * @param array $options * * @throws BadMethodCallException */ public function add($child, $type = null, array $options = array()) { throw new BadMethodCallException('Buttons cannot have children.'); } /** * Unsupported method. * * This method should not be invoked. * * @param string $name * * @throws BadMethodCallException */ public function get($name) { throw new BadMethodCallException('Buttons cannot have children.'); } /** * Unsupported method. * * @param string $name * * @return Boolean Always returns false. */ public function has($name) { return false; } /** * Unsupported method. * * This method should not be invoked. * * @param string $name * * @throws BadMethodCallException */ public function remove($name) { throw new BadMethodCallException('Buttons cannot have children.'); } /** * {@inheritdoc} */ public function all() { return array(); } /** * {@inheritdoc} */ public function getErrors() { return array(); } /** * Unsupported method. * * This method should not be invoked. * * @param string $modelData * * @throws BadMethodCallException */ public function setData($modelData) { // called during initialization of the form tree // noop } /** * Unsupported method. * * @return null Always returns null. */ public function getData() { return null; } /** * Unsupported method. * * @return null Always returns null. */ public function getNormData() { return null; } /** * Unsupported method. * * @return null Always returns null. */ public function getViewData() { return null; } /** * Unsupported method. * * @return array Always returns an empty array. */ public function getExtraData() { return array(); } /** * Returns the button's configuration. * * @return FormConfigInterface The configuration. */ public function getConfig() { return $this->config; } /** * Returns whether the button is submitted. * * @return Boolean true if the button was submitted. */ public function isSubmitted() { return $this->submitted; } /** * Returns the name by which the button is identified in forms. * * @return string The name of the button. */ public function getName() { return $this->config->getName(); } /** * Unsupported method. * * @return null Always returns null. */ public function getPropertyPath() { return null; } /** * Unsupported method. * * @param FormError $error * * @throws BadMethodCallException */ public function addError(FormError $error) { throw new BadMethodCallException('Buttons cannot have errors.'); } /** * Unsupported method. * * @return Boolean Always returns true. */ public function isValid() { return true; } /** * Unsupported method. * * @return Boolean Always returns false. */ public function isRequired() { return false; } /** * {@inheritdoc} */ public function isDisabled() { return $this->config->getDisabled(); } /** * Unsupported method. * * @return Boolean Always returns true. */ public function isEmpty() { return true; } /** * Unsupported method. * * @return Boolean Always returns true. */ public function isSynchronized() { return true; } /** * Unsupported method. * * @throws BadMethodCallException */ public function initialize() { throw new BadMethodCallException('Buttons cannot be initialized. Call initialize() on the root form instead.'); } /** * Unsupported method. * * @param mixed $request * * @throws BadMethodCallException */ public function handleRequest($request = null) { throw new BadMethodCallException('Buttons cannot handle requests. Call handleRequest() on the root form instead.'); } /** * Submits data to the button. * * @param null|string $submittedData The data. * @param Boolean $clearMissing Not used. * * @return Button The button instance * * @throws Exception\AlreadySubmittedException If the button has already been submitted. */ public function submit($submittedData, $clearMissing = true) { if ($this->submitted) { throw new AlreadySubmittedException('A form can only be submitted once'); } $this->submitted = true; return $this; } /** * {@inheritdoc} */ public function getRoot() { return $this->parent ? $this->parent->getRoot() : $this; } /** * {@inheritdoc} */ public function isRoot() { return null === $this->parent; } /** * {@inheritdoc} */ public function createView(FormView $parent = null) { if (null === $parent && $this->parent) { $parent = $this->parent->createView(); } $type = $this->config->getType(); $options = $this->config->getOptions(); $view = $type->createView($this, $parent); $type->buildView($view, $this, $options); $type->finishView($view, $this, $options); return $view; } /** * Unsupported method. * * @return integer Always returns 0. */ public function count() { return 0; } /** * Unsupported method. * * @return \EmptyIterator Always returns an empty iterator. */ public function getIterator() { return new \EmptyIterator(); } }