/**
  * Get object field as an array structure used for export
  *
  * @param array $params The export parameters. Not used here
  * @param array $files The reference to the found files used by object
  * @return array : the object array structure
  * @access public
  */
 public function asArray($params = array(), &$files)
 {
     $aField = array('id' => $this->_fieldID, 'uuid' => $this->_objectFieldValues['uuid'], 'labels' => CMS_object_i18nm::getValues($this->_objectFieldValues['labelID']), 'descriptions' => CMS_object_i18nm::getValues($this->_objectFieldValues['descriptionID']), 'objectID' => $this->_objectFieldValues['objectID'], 'type' => null, 'multi' => null, 'params' => array('order' => $this->_objectFieldValues['order'], 'required' => $this->_objectFieldValues['required'], 'indexable' => $this->_objectFieldValues['indexable'], 'searchlist' => $this->_objectFieldValues['searchlist'], 'searchable' => $this->_objectFieldValues['searchable']));
     $linkedObjectId = null;
     if (io::strpos($this->_objectFieldValues['type'], 'multi|') !== false) {
         $aField['multi'] = 1;
         $type = explode('|', $this->_objectFieldValues['type']);
         $aField['type'] = $type[1];
         $linkedObjectId = $type[1];
     } else {
         $aField['multi'] = 0;
         $aField['type'] = $this->_objectFieldValues['type'];
         if (io::isPositiveInteger($aField['type'])) {
             $linkedObjectId = $this->_objectFieldValues['type'];
         }
     }
     if ($linkedObjectId) {
         $objectDefition = new CMS_poly_object_definition($linkedObjectId);
         if ($objectDefition) {
             $aField['params']['linkedObjectUuid'] = $objectDefition->getValue('uuid');
         }
     }
     if (!io::isPositiveInteger($aField['type'])) {
         if (class_exists($aField['type'])) {
             $oType = new $aField['type'](array(), $this, false);
             $aField['params']['params'] = $oType->asArray();
         }
     } elseif ($aField['multi']) {
         $oType = new CMS_multi_poly_object($aField['type'], array(), $this, false);
         $aField['params']['params'] = $oType->asArray();
     }
     return $aField;
 }
 /**
  * Get plugin object as an array structure used for export
  *
  * @param array $params The export parameters. Not used here
  * @param array $files The reference to the found files used by object
  * @return array : the object array structure
  * @access public
  */
 public function asArray($params = array(), &$files)
 {
     $module = CMS_modulesCatalog::getByCodename(CMS_poly_object_catalog::getModuleCodenameForObjectType($this->getValue('objectID')));
     $aClass = array('id' => $this->getID(), 'uuid' => $this->getValue('uuid'), 'labels' => CMS_object_i18nm::getValues($this->getValue('labelID')), 'descriptions' => CMS_object_i18nm::getValues($this->getValue('descriptionID')), 'objectID' => $this->getValue('objectID'), 'params' => array('query' => $this->getValue('query'), 'definition' => $this->getValue('definition')));
     if ($aClass['params']['definition']) {
         $aClass['params']['definition'] = $module->convertDefinitionString($aClass['params']['definition'], true);
     }
     return $aClass;
 }
    /**
     * Get object as an array structure used for export
     *
     * @param array $params The export parameters. Not used here
     * @param array $files The reference to the found files used by object
     * @return array : the object array structure
     * @access public
     */
    public function asArray($params = array(), &$files)
    {
        $oPolymod = new CMS_polymod($this->_objectValues['module']);
        $aClass = array('id' => $this->getID(), 'uuid' => $this->getValue('uuid'), 'labels' => CMS_object_i18nm::getValues($this->_objectValues['labelID']), 'descriptions' => CMS_object_i18nm::getValues($this->_objectValues['descriptionID']), 'params' => array('resourceUsage' => $this->_objectValues['resourceUsage'], 'admineditable' => $this->_objectValues['admineditable'], 'composedLabel' => $this->_objectValues['composedLabel'], 'previewURL' => $this->_objectValues['previewURL'], 'indexable' => $this->_objectValues['indexable'], 'multilanguage' => $this->_objectValues['multilanguage'], 'indexURL' => $this->_objectValues['indexURL'], 'resultsDefinition' => $this->_objectValues['resultsDefinition']), 'fields' => array());
        if ($aClass['params']['composedLabel']) {
            $aClass['params']['composedLabel'] = $oPolymod->convertDefinitionString($aClass['params']['composedLabel'], true);
        }
        if ($aClass['params']['indexURL']) {
            $aClass['params']['indexURL'] = $oPolymod->convertDefinitionString($aClass['params']['indexURL'], true);
        }
        if ($aClass['params']['previewURL']) {
            $aClass['params']['previewURL'] = $oPolymod->convertDefinitionString($aClass['params']['previewURL'], true);
        }
        if ($aClass['params']['resultsDefinition']) {
            $aClass['params']['resultsDefinition'] = $oPolymod->convertDefinitionString($aClass['params']['resultsDefinition'], true);
        }
        $oQuery = new CMS_query('
			SELECT `id_mof`
			FROM `mod_object_field`
			WHERE `object_id_mof` = ' . $this->_ID . '
		');
        if ($oQuery->getNumRows()) {
            foreach ($oQuery->getAll(PDO::FETCH_ASSOC) as $aRow) {
                $oFieldDefiniton = new CMS_poly_object_field($aRow['id_mof']);
                $aClass['fields'][] = $oFieldDefiniton->asArray($params, $files);
            }
        }
        return $aClass;
    }
 /**
  * Get rss object as an array structure used for export
  *
  * @param array $params The export parameters. Not used here
  * @param array $files The reference to the found files used by object
  * @return array : the object array structure
  * @access public
  */
 public function asArray($params = array(), &$files)
 {
     $module = CMS_modulesCatalog::getByCodename(CMS_poly_object_catalog::getModuleCodenameForObjectType($this->getValue('objectID')));
     $aClass = array('id' => $this->getID(), 'uuid' => $this->getValue('uuid'), 'labels' => CMS_object_i18nm::getValues($this->getValue('labelID')), 'descriptions' => CMS_object_i18nm::getValues($this->getValue('descriptionID')), 'objectID' => $this->getValue('objectID'), 'params' => array('link' => $this->getValue('link'), 'author' => $this->getValue('author'), 'copyright' => $this->getValue('copyright'), 'namespaces' => $this->getValue('namespaces'), 'categories' => $this->getValue('categories'), 'ttl' => $this->getValue('ttl'), 'email' => $this->getValue('email'), 'definition' => $this->getValue('definition')));
     if ($aClass['params']['definition']) {
         $aClass['params']['definition'] = $module->convertDefinitionString($aClass['params']['definition'], true);
     }
     return $aClass;
 }