public function getEntityName($plural = false)
    {
        $entityClassName = $this->getEntityClassName();
        if ($entityClassName !== null) {
            $entityName = ObjectHelper::class_basename($entityClassName);
        } else {
            $entityName = ObjectHelper::class_basename($this);
        }

        if ($plural) {
            return StringHelper::plural($entityName, is_numeric($plural) ? $plural : 2);
        } else {
            return $entityName;
        }
    }
public function getEntityName($plural = false)
    {
        $entityClassName = $this->getEntityClassName();
        if ($entityClassName !== null) {
            $entityName = ObjectHelper::class_basename($entityClassName);
        } else {
            $entityName = ObjectHelper::class_basename($this);
        }

        if ($plural) {
            return StringHelper::plural($entityName, is_numeric($plural) ? $plural : 2);
        } else {
            return $entityName;
        }
    }
public function getEntityName ( $ plural = false ) { $ entityClassName = $ this -> getEntityClassName ( ) ; if ( $ entityClassName !== null ) { $ entityName = ObjectHelper :: class_basename ( $ entityClassName ) ; } else { $ entityName = ObjectHelper :: class_basename ( $ this ) ; } if ( $ plural ) { return StringHelper :: plural ( $ entityName , is_numeric ( $ plural ) ? $ plural : 2 ) ; } else { return $ entityName ; } }
Similar to getEntityClassName, but instead returns a human readable name.
@param bool $plural
@return string
Similar to getEntityClassName but instead returns a human readable name .