Neos\ContentRepository\Domain\Utility\NodePaths::getNodeNameFromPath PHP Method

getNodeNameFromPath() public static method

Get the name for a Node based on the given path.
public static getNodeNameFromPath ( string $path ) : string
$path string
return string
    public static function getNodeNameFromPath($path)
    {
        return $path === '/' ? '' : substr($path, strrpos($path, '/') + 1);
    }

Usage Example

コード例 #1
0
 /**
  * Returns the name of this node
  *
  * @return string
  */
 public function getName()
 {
     return NodePaths::getNodeNameFromPath($this->path);
 }
All Usage Examples Of Neos\ContentRepository\Domain\Utility\NodePaths::getNodeNameFromPath