Exemple #1
0
 /**
  * Get all available attributes from a specific sharepoint list
  *
  * @param string $identifier
  * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
  */
 public function findAttributesByListIdentifier($identifier)
 {
     $properties = $this->sharepointHandler->readListMeta($identifier);
     $attributes = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage');
     foreach ($properties as $propertyNode) {
         $attribute = array();
         $attribute['sharepointFieldName'] = $propertyNode['name'];
         $attribute['sharepointDisplayName'] = $propertyNode['displayname'];
         $attribute['type'] = $propertyNode['type'];
         $attribute['childContent'] = $propertyNode['value'];
         $attribute['required'] = (bool) $propertyNode['required'];
         if ('Lookup' == $propertyNode['type']) {
             $attribute['lookuplist'] = $propertyNode['list'];
             $attribute['sourceid'] = $propertyNode['sourceid'];
         }
         $attribute['typo3FieldName'] = '';
         $attributes->attach($this->propertyMapper->convert($attribute, 'Aijko\\SharepointConnector\\Domain\\Model\\Mapping\\Attribute'));
     }
     return $attributes;
 }