public function determineActions(Type $fromType, Type $toType)
    {
        $actions = array();
        foreach ($fromType->fieldDefinitions as $fieldDef) {
            if (!$this->hasFieldDefinition($toType, $fieldDef)) {
                $actions[] = new ContentUpdater\Action\RemoveField(
                    $this->contentGateway,
                    $fieldDef,
                    $this->storageHandler,
                    $this->contentMapper
                );
            }
        }
        foreach ($toType->fieldDefinitions as $fieldDef) {
            if (!$this->hasFieldDefinition($fromType, $fieldDef)) {
                $actions[] = new ContentUpdater\Action\AddField(
                    $this->contentGateway,
                    $fieldDef,
                    $this->converterRegistry->getConverter(
                        $fieldDef->fieldType
                    ),
                    $this->storageHandler,
                    $this->contentMapper
                );
            }
        }

        return $actions;
    }
public function determineActions(Type $fromType, Type $toType)
    {
        $actions = array();
        foreach ($fromType->fieldDefinitions as $fieldDef) {
            if (!$this->hasFieldDefinition($toType, $fieldDef)) {
                $actions[] = new ContentUpdater\Action\RemoveField(
                    $this->contentGateway,
                    $fieldDef,
                    $this->storageHandler,
                    $this->contentMapper
                );
            }
        }
        foreach ($toType->fieldDefinitions as $fieldDef) {
            if (!$this->hasFieldDefinition($fromType, $fieldDef)) {
                $actions[] = new ContentUpdater\Action\AddField(
                    $this->contentGateway,
                    $fieldDef,
                    $this->converterRegistry->getConverter(
                        $fieldDef->fieldType
                    ),
                    $this->storageHandler,
                    $this->contentMapper
                );
            }
        }

        return $actions;
    }
public function determineActions ( Type $ fromType , Type $ toType ) { $ actions = array ( ) ; foreach ( $ fromType -> fieldDefinitions as $ fieldDef ) { if ( ! $ this -> hasFieldDefinition ( $ toType , $ fieldDef ) ) { $ actions [ ] = new ContentUpdater \ Action \ RemoveField ( $ this -> contentGateway , $ fieldDef , $ this -> storageHandler , $ this -> contentMapper ) ; } } foreach ( $ toType -> fieldDefinitions as $ fieldDef ) { if ( ! $ this -> hasFieldDefinition ( $ fromType , $ fieldDef ) ) { $ actions [ ] = new ContentUpdater \ Action \ AddField ( $ this -> contentGateway , $ fieldDef , $ this -> converterRegistry -> getConverter ( $ fieldDef -> fieldType ) , $ this -> storageHandler , $ this -> contentMapper ) ; } } return $ actions ; }
Determines the necessary update actions.

@param \eZ\Publish\SPI\Persistence\Content\Type $fromType
@param \eZ\Publish\SPI\Persistence\Content\Type $toType

@return \eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action[]
Determines the necessary update actions .