/** * Показатели, переданные в форме * * @return CArrayList */ public function getIndexes() { if (is_null($this->_indexes)) { $this->_indexes = new CArrayList(); foreach ($this->getItems()->getItems() as $key => $item) { if (strpos($key, "indexes") !== false) { foreach ($item as $value) { $indexValue = CRatingManager::getRatingIndexValue($value); if (!is_null($indexValue)) { $this->_indexes->add($indexValue->getId(), $indexValue); } } } } } return $this->_indexes; }
public function actionDeleteValue() { $value = CRatingManager::getRatingIndexValue(CRequest::getInt("id")); if (!is_null($value)) { $index = $value->parentIndex->id; $value->remove(); $this->redirect("?action=edit&id=" . $index); return true; } $this->redirect("?action=index"); }