eZ\Publish\Core\Repository\Helper\FieldTypeRegistry::getFieldTypes PHP Method

getFieldTypes() public method

Returns a list of all SPI FieldTypes.
public getFieldTypes ( ) : eZ\Publish\SPI\FieldType\FieldType[]
return eZ\Publish\SPI\FieldType\FieldType[]
    public function getFieldTypes()
    {
        // First make sure all items are correct type (call closures)
        foreach ($this->fieldTypes as $identifier => $value) {
            if (!$value instanceof SPIFieldType) {
                $this->getFieldType($identifier);
            }
        }
        return $this->fieldTypes;
    }

Usage Example

コード例 #1
0
 /**
  * Returns a list of all field types.
  *
  * @return \eZ\Publish\API\Repository\FieldType[]
  */
 public function getFieldTypes()
 {
     foreach ($this->fieldTypeRegistry->getFieldTypes() as $identifier => $spiFieldType) {
         if (isset($this->fieldTypes[$identifier])) {
             continue;
         }
         $this->fieldTypes[$identifier] = new FieldType($spiFieldType);
     }
     return $this->fieldTypes;
 }
All Usage Examples Of eZ\Publish\Core\Repository\Helper\FieldTypeRegistry::getFieldTypes