Skip to content

Commit

Permalink
Remove PR zendframework#5093 code
Browse files Browse the repository at this point in the history
  • Loading branch information
thestanislav committed Apr 8, 2014
1 parent 08fa2c5 commit db4bd6a
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions library/Zend/Form/Element/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function setObject($object)
}

$this->object = $object;
$this->count = count($object);
$this->count = count($object);

return $this;
}
Expand Down Expand Up @@ -202,9 +202,9 @@ public function populateValues($data)

if (!$this->allowRemove && count($data) < $this->count) {
throw new Exception\DomainException(sprintf(
'There are fewer elements than specified in the collection (%s). Either set the allow_remove option ' .
'to true, or re-submit the form.',
get_class($this)
'There are fewer elements than specified in the collection (%s). Either set the allow_remove option ' .
'to true, or re-submit the form.',
get_class($this)
)
);
}
Expand Down Expand Up @@ -350,7 +350,7 @@ public function getTargetElement()
*/
public function setAllowAdd($allowAdd)
{
$this->allowAdd = (bool) $allowAdd;
$this->allowAdd = (bool)$allowAdd;
return $this;
}

Expand All @@ -370,7 +370,7 @@ public function allowAdd()
*/
public function setAllowRemove($allowRemove)
{
$this->allowRemove = (bool) $allowRemove;
$this->allowRemove = (bool)$allowRemove;
return $this;
}

Expand All @@ -390,7 +390,7 @@ public function allowRemove()
*/
public function setShouldCreateTemplate($shouldCreateTemplate)
{
$this->shouldCreateTemplate = (bool) $shouldCreateTemplate;
$this->shouldCreateTemplate = (bool)$shouldCreateTemplate;

return $this;
}
Expand Down Expand Up @@ -436,7 +436,7 @@ public function getTemplatePlaceholder()
*/
public function setCreateNewObjects($createNewObjects)
{
$this->createNewObjects = (bool) $createNewObjects;
$this->createNewObjects = (bool)$createNewObjects;
return $this;
}

Expand Down Expand Up @@ -528,29 +528,7 @@ public function extract()
}
}
}

/** @var $fieldset Fieldset */
/*
foreach ($values as $name => $object) {
$fieldset = $this->addNewTargetElementInstance($name);
if ($fieldset->allowObjectBinding($object)) {
$fieldset->setObject($object);
$values[$name] = $fieldset->extract();
} else {
foreach ($fieldset->getFieldsets() as $childFieldset) {
$childName = $childFieldset->getName();
if (isset($object[$childName])) {
$childObject = $object[$childName];
if ($childFieldset->allowObjectBinding($childObject)) {
$childFieldset->setObject($childObject);
$values[$name][$childName] = $childFieldset->extract();
}
}
}
}
}
*/

return $values;
}

Expand Down

0 comments on commit db4bd6a

Please sign in to comment.