/**
  * Returns eZXML content to insert into XML blocks (ezxmltext datatype)
  * eZXML is generated from HTML content provided as argument
  * @param string $htmlContent Input HTML string
  * @return string Generated eZXML string
  * @see SQLIContentUtils::getRichContent()
  */
 protected function getRichContent($htmlContent)
 {
     return SQLIContentUtils::getRichContent($htmlContent);
 }
 /**
  * Crea un oggetto a partire da un fieldArray di tipo ezimage, ezbinaryfile
  * @see eZContentUpload
  * @params array $fieldArray
  * @return int content object id
  */
 protected function createMedia($fieldArray)
 {
     $filePath = SQLIContentUtils::getRemoteFile($fieldArray['value']);
     $upload = new eZContentUpload();
     $result = array();
     if ($upload->handleLocalFile($result, $filePath, 'auto', false) == true) {
         return $result['contentobject_id'];
     }
     eZDebug::writeNotice(var_export($result['notices']), __METHOD__);
     eZDebug::writeError(var_export($result['errors']), __METHOD__);
     return '';
 }
 public function getRichContent()
 {
     $this->input = self::parser($this->input);
     return SQLIContentUtils::getRichContent($this->input);
 }
 private function getAttributesStringArray(eZContentObject $eZContentObject)
 {
     $attributeList = array();
     $excludedAttributes = array();
     $excludedAttributesOfClass = array();
     # filtro i campi da scartare per la specifica classe
     $classidentifier = $this->remoteApiNode->metadata['classIdentifier'];
     #print_r('$classidentifier=');
     #print_r($classidentifier);
     $excludedAttributes = $this->itFiltersUtil->getExcludedAttributes();
     //echo '<pre>';
     //print_r('ARRAY ATTRIBUTI DA SCARTARE $excludedAttributes:');
     //print_r($excludedAttributes);
     $excludedAttributesOfClass = $excludedAttributes[$classidentifier];
     //print_r('  CLASSE=');
     //print_r($classidentifier);
     //print_r('  ARRAY ATTRIBUTI DA SCARTARE PER LA MIA CLASSE $excludedAttributes:');
     //print_r($excludedAttributesOfClass);
     foreach ((array) $this->remoteApiNode->fields as $identifier => $fieldArray) {
         if (!in_array($fieldArray['identifier'], (array) $excludedAttributesOfClass)) {
             switch ($fieldArray['type']) {
                 case 'ezxmltext':
                     $attributeList[$identifier] = SQLIContentUtils::getRichContent($fieldArray['value']);
                     break;
                 case 'ezbinaryfile':
                 case 'ezimage':
                     if (!empty($fieldArray['value'])) {
                         $attributeList[$identifier] = SQLIContentUtils::getRemoteFile($fieldArray['value']);
                     }
                     break;
                     /*
                     case 'ezobjectrelationlist':
                     $parentNodeID = $this->findRelationObjectLocation( $identifier, $parentNodeID );
                     $attributeList[$identifier] = $this->createRelationObjects( $fieldArray, $parentNodeID, $isUpdate );
                     break;
                     */
                 /*
                 case 'ezobjectrelationlist':
                 $parentNodeID = $this->findRelationObjectLocation( $identifier, $parentNodeID );
                 $attributeList[$identifier] = $this->createRelationObjects( $fieldArray, $parentNodeID, $isUpdate );
                 break;
                 */
                 case 'eztags':
                     $attributeList[$identifier] = $this->createLocalTags($identifier, $fieldArray['string_value']);
                     break;
                 default:
                     $attributeList[$identifier] = $fieldArray['string_value'];
                     break;
             }
         }
     }
     return $attributeList;
 }