Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Magical component factory
- *
- * @param \Nette\ComponentModel\IContainer
- */
- protected function attached($obj)
- {
- if ($obj instanceof Nette\Application\UI\Presenter) {
- $this->loadHttpData();
- if ($this->createDefault > 0) {
- if (!$this->getForm()->isSubmitted()) {
- foreach (range(0, $this->createDefault - 1) as $key) {
- $this->createComponent($key);
- }
- } elseif ($this->forceDefault) {
- while ($this->getContainers()->count() < $this->createDefault) {
- $this->createOne();
- }
- }
- }
- }
- parent::attached($obj);
- }
Advertisement
Add Comment
Please, Sign In to add comment