for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pim\Bundle\CustomEntityBundle\Versioning;
use Doctrine\ORM\EntityManager;
use Pim\Bundle\VersioningBundle\UpdateGuesser\UpdateGuesserInterface;
/**
* Attribute option update guesser
*
* @author Nicolas Dupont <[email protected]>
* @copyright 2013 Akeneo SAS (http://www.akeneo.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class UpdateGuesser implements UpdateGuesserInterface
{
* {@inheritdoc}
public function supportAction($action)
return in_array(
$action,
array(UpdateGuesserInterface::ACTION_UPDATE_ENTITY, UpdateGuesserInterface::ACTION_DELETE)
);
}
public function guessUpdates(EntityManager $em, $entity, $action)
$pendings = array();
if ($entity instanceof VersionableInterface) {
$pendings[] = $entity;
return $pendings;