/** * Set conditions params * * @param string $type */ public function setConditionsParams($type) { $optionsNesting = self::$optionsNesting; if (self::$qtyOptionsNesting > 0) { for ($i = 1; $i < self::$qtyOptionsNesting; $i++) { $optionsNesting = self::$optionsNesting . '--' . self::$optionsQty; } $this->addParameter('condition', $optionsNesting); self::$optionsQty = $this->getControlCount('pageelement', 'rule_' . $type . '_item_row'); } else { $this->addParameter('condition', $optionsNesting); self::$optionsQty = $this->getControlCount('pageelement', 'apply_for_rule_' . $type . '_row'); } self::$optionsNesting = $optionsNesting; $this->addParameter('key', self::$optionsQty); }
/** * Set conditions params * * @param string $type */ public function setConditionsParams($type) { $optionsNesting = self::$optionsNesting; if (self::$qtyOptionsNesting > 0) { for ($i = 1; $i < self::$qtyOptionsNesting; $i++) { $optionsNesting = self::$optionsNesting . '--' . self::$optionsQty; } $this->addParameter('condition', $optionsNesting); $xpath = $this->_getControlXpath('fieldset', 'rule_' . $type . '_item') . '/li'; } else { $xpath = $this->_getControlXpath('fieldset', 'apply_for_rule_' . $type) . '/ul/li'; $this->addParameter('condition', $optionsNesting); } self::$optionsNesting = $optionsNesting; self::$optionsQty = $this->getXpathCount($xpath); $this->addParameter('key', self::$optionsQty); }