PHP Class Newscoop\Article\LinkService

Exibir arquivo Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$urlMap array

Protected Properties

Property Type Description
$em Doctrine\ORM\EntityManager
$router Newscoop\Router
$sectionTypes array
$symfonyRouter Symfony\Component\Routing\Router

Public Methods

Method Description
__construct ( EntityManager $em, Zend_Controller_Router_Rewrite $router, Router $symfonyRouter )
encode ( string $url ) : string Encode url
getArticleTopicName ( object $article ) : string Get article topic name
getBaseUrl ( string $path = '' ) : string Get curent request base url path.
getIssueShortName ( Article $article ) : string Get issue short name
getLink ( Article $article ) : string Get link
getLinkCanonical ( Article $article ) : string Get canonical link
getPublicationAliasName ( Article $article ) : string Get publication alias
getSectionShortName ( Article $article ) : string Get section short name
getSeo ( object $article, array $fields ) : string Get seo string

Method Details

__construct() public method

public __construct ( EntityManager $em, Zend_Controller_Router_Rewrite $router, Router $symfonyRouter )
$em Doctrine\ORM\EntityManager
$router Zend_Controller_Router_Rewrite
$symfonyRouter Symfony\Component\Routing\Router

encode() public method

Encode url
public encode ( string $url ) : string
$url string
return string

getArticleTopicName() public method

Get article topic name
public getArticleTopicName ( object $article ) : string
$article object
return string

getBaseUrl() public method

Get curent request base url path.
public getBaseUrl ( string $path = '' ) : string
$path string path to be appended to base url
return string composed path

getIssueShortName() public method

Get issue short name
public getIssueShortName ( Article $article ) : string
$article Newscoop\Entity\Article
return string

getLinkCanonical() public method

Get canonical link
public getLinkCanonical ( Article $article ) : string
$article Newscoop\Entity\Article
return string

getPublicationAliasName() public method

Get publication alias
public getPublicationAliasName ( Article $article ) : string
$article Newscoop\Entity\Article
return string Name of the publication alias

getSectionShortName() public method

Get section short name
public getSectionShortName ( Article $article ) : string
$article Newscoop\Entity\Article
return string

getSeo() public method

Get seo string
public getSeo ( object $article, array $fields ) : string
$article object
$fields array
return string

Property Details

$em protected_oe property

protected EntityManager,Doctrine\ORM $em
return Doctrine\ORM\EntityManager

$router protected_oe property

protected Newscoop\Router $router
return Newscoop\Router

$sectionTypes protected_oe property

protected array $sectionTypes
return array

$symfonyRouter protected_oe property

protected Router,Symfony\Component\Routing $symfonyRouter
return Symfony\Component\Routing\Router

$urlMap static_oe public_oe property

static public array $urlMap
return array