28 lines
605 B
PHP
28 lines
605 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Drupal\cdesai_tff;
|
||
|
|
|
||
|
|
|
||
|
|
use Drupal\Core\Field\FieldItemInterface;
|
||
|
|
|
||
|
|
interface SlugifyServiceInterface {
|
||
|
|
|
||
|
|
const CONFIG_NAME = 'cdesai_tff.settings';
|
||
|
|
const DEFAULT_SEPARATOR = '_';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Converts the given item to slug format.
|
||
|
|
*
|
||
|
|
* @param \Drupal\Core\Field\FieldItemInterface $item
|
||
|
|
* Field item object that needs to be converted.
|
||
|
|
*
|
||
|
|
* @param string|null $separator (optional)
|
||
|
|
* Separator to use for slug. Defaults to '_'.
|
||
|
|
*
|
||
|
|
* @return string
|
||
|
|
* The converted string.
|
||
|
|
*/
|
||
|
|
public function convertToSlug(FieldItemInterface $item, $separator = NULL);
|
||
|
|
|
||
|
|
}
|