/** * @private */ function _getArticleCustomFields() { // prepare the custom fields $fields = array(); if (is_array($this->_customFields)) { foreach ($this->_customFields as $fieldId => $fieldValue) { // 3 of those parameters are not really need when creating a new object... it's enough that // we know the field definition id. $row = array("field_id" => $fieldId, "field_value" => $fieldValue, "field_name" => "", "field_type" => -1, "field_description" => "", "article_id" => -1, "blog_id" => $this->_blogInfo->getId(), "id" => -1); // let's get the right value $customField = CustomFieldValueFactory::getCustomFieldValueByFieldId($fieldId, $row); $fieldName = $customField->getName(); $fields["{$fieldName}"] = $customField; } } return $fields; }