public function getSortingOptions(array $columns = []) : array
 {
     $sorting = [];
     foreach ($columns as $column => $directions) {
         foreach ($directions as $direction) {
             $label = sprintf('product.options.order_by.%s.%s', Helper::snake($column), $direction);
             $active = $this->isSortingActive($column, $direction);
             $sorting[] = ['orderBy' => $column, 'orderDir' => $direction, 'label' => $label, 'active' => $active];
         }
     }
     return $sorting;
 }
 /**
  * {@inheritdoc}
  */
 public function createIndex($name)
 {
     $kernelDir = $this->kernel->getRootDir();
     $indexDir = $kernelDir . '/store/lucene/' . Helper::snake($name);
     $this->luceneManager->setIndex($name, $indexDir, 'ZendSearch\\Lucene\\Analysis\\Analyzer\\Common\\Utf8\\CaseInsensitive');
 }
 /**
  * Returns event name for bundle
  *
  * @param         $name
  * @param Request $request
  *
  * @return string
  */
 private function getEventName($name, Request $request)
 {
     $bundle = $request->request->get('_bundle');
     $snake = Helper::snake($bundle);
     return sprintf('%s.%s', $snake, $name);
 }
 /**
  * Returns event name for particular resource
  *
  * @param string $class
  * @param string $name
  *
  * @return string
  */
 protected function getResourceEventName($class, $name)
 {
     return sprintf('%s.%s', Helper::snake($class), $name);
 }
 private function getEventName($class, $name)
 {
     return sprintf('%s.%s', Helper::snake($class), $name);
 }
 public function getAlias() : string
 {
     $parts = explode('\\', $this->getEntityName());
     $entityName = end($parts);
     return Helper::snake($entityName);
 }