Sulu\Component\PHPCR\PathCleanupInterface::cleanup PHP Метод

cleanup() публичный Метод

returns a clean string.
public cleanup ( string $dirty, string $languageCode = null ) : string
$dirty string dirty string to cleanup
$languageCode string
Результат string clean string
    public function cleanup($dirty, $languageCode = null);

Usage Example

Пример #1
0
 /**
  * returns whole path for given ContentNode.
  *
  * @param string $title        title of new node
  * @param string $parentPath   parent path of new contentNode
  * @param string $webspaceKey  key of portal
  * @param string $languageCode
  * @param string $segmentKey
  *
  * @return string whole path
  */
 public function generate($title, $parentPath, $webspaceKey, $languageCode, $segmentKey = null)
 {
     // title should not have a slash
     $title = str_replace('/', '-', $title);
     // get generated path from childClass
     $path = $this->generatePath($title, $parentPath);
     // cleanup path
     $path = $this->cleaner->cleanup($path, $languageCode);
     // get unique path
     $path = $this->mapper->getUniquePath($path, $webspaceKey, $languageCode, $segmentKey);
     return $path;
 }
All Usage Examples Of Sulu\Component\PHPCR\PathCleanupInterface::cleanup
PathCleanupInterface