Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
digitalascetic/entity-associations / Service / EntityAssociationsServiceInterface.php
Size: Mime:
<?php
/**
 * Created by PhpStorm.
 * User: eduarddezacastellano
 * Date: 13/02/2018
 * Time: 18:10
 */

namespace DigitalAscetic\EntityAssociationsBundle\Service;


interface EntityAssociationsServiceInterface
{
    /**
     * This method check if an entity has some related entities
     * according to config.yml criteria (digital_ascetic_entity_associations.entities).
     * Returns false if not present or an exception if found
     *
     * @param $entity
     * @return bool
     * @throws \Exception
     */
    public function checkEntityAssociations($entity);

    /**
     * This method replace the entity associations detected from $fromEntity to $toEntity
     * according config.yml
     *
     * @param $fromEntity
     * @param $toEntity
     * @return bool
     * @throws \Exception
     */
    public function replaceEntityAssociations($fromEntity, $toEntity);
}