RemovePathAliasField.php in Acquia Content Hub 8.2
File
src/EventSubscriber/ExcludeContentField/RemovePathAliasField.php
View source
<?php
namespace Drupal\acquia_contenthub\EventSubscriber\ExcludeContentField;
use Drupal\acquia_contenthub\Event\ExcludeEntityFieldEvent;
class RemovePathAliasField extends ExcludeContentFieldBase {
public static $priority = 60;
public function shouldExclude(ExcludeEntityFieldEvent $event) : bool {
return $event
->getEntity()
->getEntityTypeId() !== 'path_alias' && $event
->getFieldName() === 'path';
}
}