Example #1
0
 /**
  * @param $loop Loop
  * @return string
  */
 protected function parseLoopElement(Loop $loop)
 {
     if ($loop->has_id && $loop->counter) {
         if (($expand_property_path = $this->parameters[Parameter::EXPAND_PROPERTY_PATH]) && isset($this->cache[self::PARSED_ID][$this->getFormId()])) {
             if (substr($expand_property_path, -1) === DOT) {
                 $expand_property_path = substr($expand_property_path, 0, -1) . '[]';
             }
             $form_id = $this->getFormId();
             foreach ($this->cache[self::PARSED_ID][$form_id] as $key => $value) {
                 if (substr($key, 0, strlen($expand_property_path)) === $expand_property_path) {
                     unset($this->cache[self::PARSED_ID][$form_id][$key]);
                 }
             }
         }
     }
     return parent::parseLoopElement($loop);
 }