PHP Class Newscoop\Entity\Article

Inheritance: implements Newscoop\Search\DocumentInterface
Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Свойство Type Description
$articleAuthors object Article Authors for Newscoop\Gimme.
$articleOrder integer
$attachments Doctrine\Common\Collections\ArrayCollection
$authors Doctrine\Common\Collections\Collection
$comments Newscoop\Entity\Comments
$commentsLocked integer
$comments_count integer
$comments_enabled integer
$comments_link string
$creator Newscoop\Entity\User
$data ArticleData
$fields array Article fields used by Newscoop API.
$images Doctrine\Common\Collections\ArrayCollection
$indexed DateTime
$isIndexed string
$issue Newscoop\Entity\Issue
$issueId integer TODO: Fix this bug. It's not Issue Id - it's issueNumber!
$keywords string
$language Newscoop\Entity\Language
$lockTime DateTime
$lockUser Newscoop\Entity\User
$name string
$number integer
$objectId integer
$onFrontPage string
$onSection string
$packages Newscoop\Package\Package
$playlists Newscoop\Entity\Playlist
$public string
$publication Newscoop\Entity\Publication
$published DateTime
$reads integer Article reads number used by Newscoop API.
$recommended_comments_count integer
$renditions array Article renditions used by Newscoop API.
$section Newscoop\Entity\Section
$sectionId integer TODO: Fix this bug. It's not section Id - it's sectionNumber!
$shortName string
$snippets Doctrine\Common\Collections\ArrayCollection
$topics Doctrine\Common\Collections\ArrayCollection
$translations array Article translations used by Newscoop API.
$type string
$updated DateTime
$uploaded DateTime
$webcode Newscoop\Entity\Webcode
$workflowStatus string

Méthodes publiques

Méthode Description
__construct ( integer $number, Language $language )
addAttachment ( Attachment $attachment ) : self Setter for attachments.
addSnippet ( Snippet $snippet ) : Newscoop\Entity\Article Add a Snippet to the Article.
addTopic ( Topic $topic ) : boolean Add Topic to the Article.
author ( string $title, array $fields ) Author article.
commentsEnabled ( ) : integer Get whether commenting is enabled.
commentsLocked ( ) : mixed Getter for commentsLocked.
getArticleAuthors ( ) : object Get articleAuthors.
getArticleOrder ( ) : integer Gets the value of articleOrder.
getAttachments ( ) : ArrayCollection Getter for attachments.
getCommentsEnabled ( ) : integer Get whether commenting is enabled.
getCommentsLocked ( ) : mixed Getter for commentsLocked.
getCreator ( ) : Newscoop\Entity\User Get creator.
getData ( string $field ) : mixed Get article type field data.
getDate ( ) : string Get date.
getFieldNames ( ) : mixed Get all field names for this article type.
getFields ( ) : object Get fields.
getFirstImage ( ) : Newscoop\Image\LocalImage Get article first image.
getId ( ) : integer Get article id.
getImages ( ) : ArrayCollection Getter for images.
getIndexed ( ) : DateTime Get indexed.
getIsIndexed ( ) : string Gets the value of isIndexed.
getIssue ( ) : Issue Getter for issue.
getIssueId ( ) : integer Gets the value of issueId.
getKeywords ( ) : string Get keywords.
getLanguage ( ) : Newscoop\Entity\Language Get language.
getLanguageCode ( ) : integer Get language code.
getLanguageId ( ) : integer Get language id.
getLanguageObject ( ) : Newscoop\Entity\Language Get language object.
getLockTime ( ) : DateTime Gets the value of lockTime.
getLockTimeDiffrence ( ) : array Gets the time difference between current and article lock time.
getLockUser ( ) : Newscoop\Entity\User Gets the value of lockUser.
getName ( ) : string Get article name.
getNumber ( ) : integer Get number.
getObject ( )
getOnFrontPage ( ) : string Gets the value of onFrontPage.
getOnSection ( ) : string Gets the value of onSection.
getPackages ( ) : object Get packages.
getPublic ( ) : string Gets the value of public.
getPublication ( ) : Newscoop\Entity\Publication Get publication.
getPublicationId ( ) : integer Get publication id.
getPublishDate ( ) : string Get publishDate.
getPublished ( ) : string Get published.
getReads ( ) : integer Set reads.
getRenditions ( ) : object Get renditions.
getSection ( ) : Section Get section.
getSectionId ( ) : integer Gets the value of sectionId.
getShortName ( ) : string Gets the value of shortName.
getSnippets ( ) Get Article Snippets.
getTitle ( ) : string Get title.
getTopicNames ( ) : array Get topic names.
getTopics ( ) : object Get topics.
getTranslations ( ) : object Get translations.
getType ( ) : string Get type.
getUpdated ( ) : mixed Getter for updated.
getUploaded ( ) : DateTime Gets the value of uploaded.
getView ( ) : object Get view.
getWebcode ( ) : string Get webcode.
getWebcodeEntity ( ) : string Get webcode object.
getWorkflowStatus ( $readable = false ) : string Get workflowStatus.
hasWebcode ( ) : boolean Test if article has webcode.
isLocked ( ) : boolean Checks if article is locked or not.
isPublished ( ) : boolean Test if article is published.
publish ( ) * Publish article
removeSnippet ( Snippet $snippet ) : Newscoop\Entity\Article Remove a Snippet from the Article.
removeTopic ( Topic $topic ) : boolean Remove a Topic from the Article.
setArticleAuthors ( $articleAuthors ) Set articleAuthors $articleAuthors.
setArticleOrder ( integer $articleOrder ) : self Sets the value of articleOrder.
setAttachments ( ArrayCollection | null $attachments ) : self Setter for attachments.
setCommentsEnabled ( integer $comments_enabled ) Set commenting en/disabled.
setCommentsLink ( string $link ) Set comments_link.
setCommentsLocked ( mixed $commentsLocked ) : self Setter for commentsLocked.
setCreator ( User $p_user ) : Article Set creator.
setData ( array $data ) Set data.
setDate ( DateTime $date ) Set date.
setFieldData ( string $field, string $value ) : mixed Set article type field data.
setFields ( $fields ) Set Fields $fields.
setId ( integer $p_id ) : Article Set article id.
setImages ( ArrayCollection $images ) : self Setter for images.
setIndexed ( DateTime $indexed = null ) : self Set indexed.
setIsIndexed ( boolean $isIndexed ) : self Sets the value of isIndexed.
setIssue ( Issue $issue ) : self Setter for issue.
setIssueId ( integer $issueId ) : self Sets the value of issueId.
setKeywords ( $keywords ) Set Keywords.
setLanguage ( Language $p_language ) : Newscoop\Entity\Article Set language.
setLockTime ( DateTime $lockTime = null ) : self Sets the value of lockTime.
setLockUser ( User $lockUser = null ) : self Sets the value of lockUser.
setName ( string $name ) : self Sets the value of name.
setNumber ( $number ) : integer Set number.
setOnFrontPage ( string $onFrontPage = false ) : self Sets the value of onFrontPage.
setOnSection ( string $onSection = false ) : self Sets the value of onSection.
setPackages ( $packages ) Set Packages $packages.
setPublic ( boolean $public ) : self Sets the value of public.
setPublication ( Publication $p_publication ) : Article Set publication.
setPublished ( Datetime | null $published ) : self Set published.
setReads ( integer $reads ) Get reads.
setRenditions ( $renditions ) Set renditions $renditions.
setSection ( Section $section ) : self Setter for section.
setSectionId ( integer $sectionId ) : self Sets the value of sectionId.
setShortName ( string $shortName ) : self Sets the value of shortName.
setTitle ( string $title ) Set title.
setTopics ( $topics ) Set Topics $topics.
setTranslations ( $translations ) Set translations $translations.
setType ( string $type ) : self Sets the value of type.
setUpdated ( DateTime $updated ) : self Setter for updated.
setUploaded ( DateTime $uploaded ) : self Sets the value of uploaded.
setWebcode ( Newscoop\Entity\Webcode $webcode ) Set webcode.
setWorkflowStatus ( $workflowStatus ) Set workflowStatus.

Private Methods

Méthode Description
addFields ( ArticleView $view ) : array Add field properties to view.
initArticleData ( ) : ArticleData Init ArticleData.
setFieldValue ( string $field, string $value ) Set article type field value.

Method Details

__construct() public méthode

public __construct ( integer $number, Language $language )
$number integer
$language Language

addAttachment() public méthode

Setter for attachments.
public addAttachment ( Attachment $attachment ) : self
$attachment Attachment
Résultat self

addSnippet() public méthode

Add a Snippet to the Article.
public addSnippet ( Snippet $snippet ) : Newscoop\Entity\Article
$snippet Snippet the Snippet to attach
Résultat Newscoop\Entity\Article

addTopic() public méthode

Add Topic to the Article.
public addTopic ( Topic $topic ) : boolean
$topic Newscoop\NewscoopBundle\Entity\Topic the Topic to attach
Résultat boolean

author() public méthode

Author article.
public author ( string $title, array $fields )
$title string
$fields array

commentsEnabled() public méthode

Get whether commenting is enabled.
public commentsEnabled ( ) : integer
Résultat integer

commentsLocked() public méthode

Getter for commentsLocked.
public commentsLocked ( ) : mixed
Résultat mixed

getArticleAuthors() public méthode

Get articleAuthors.
public getArticleAuthors ( ) : object
Résultat object

getArticleOrder() public méthode

Gets the value of articleOrder.
public getArticleOrder ( ) : integer
Résultat integer

getAttachments() public méthode

Getter for attachments.
public getAttachments ( ) : ArrayCollection
Résultat Doctrine\Common\Collections\ArrayCollection

getCommentsEnabled() public méthode

Get whether commenting is enabled.
public getCommentsEnabled ( ) : integer
Résultat integer

getCommentsLocked() public méthode

Getter for commentsLocked.
public getCommentsLocked ( ) : mixed
Résultat mixed

getCreator() public méthode

Get creator.
public getCreator ( ) : Newscoop\Entity\User
Résultat Newscoop\Entity\User

getData() public méthode

Get article type field data.
public getData ( string $field ) : mixed
$field string
Résultat mixed

getDate() public méthode

Get date.
public getDate ( ) : string
Résultat string

getFieldNames() public méthode

Get all field names for this article type.
public getFieldNames ( ) : mixed
Résultat mixed Returns array with field names or null

getFields() public méthode

Get fields.
public getFields ( ) : object
Résultat object

getFirstImage() public méthode

Get article first image.
public getFirstImage ( ) : Newscoop\Image\LocalImage
Résultat Newscoop\Image\LocalImage

getId() public méthode

Get article id.
public getId ( ) : integer
Résultat integer

getImages() public méthode

Getter for images.
public getImages ( ) : ArrayCollection
Résultat Doctrine\Common\Collections\ArrayCollection

getIndexed() public méthode

Get indexed.
public getIndexed ( ) : DateTime
Résultat DateTime

getIsIndexed() public méthode

Gets the value of isIndexed.
public getIsIndexed ( ) : string
Résultat string

getIssue() public méthode

Getter for issue.
public getIssue ( ) : Issue
Résultat Issue

getIssueId() public méthode

Gets the value of issueId.
public getIssueId ( ) : integer
Résultat integer

getKeywords() public méthode

Get keywords.
public getKeywords ( ) : string
Résultat string

getLanguage() public méthode

Get language.
public getLanguage ( ) : Newscoop\Entity\Language
Résultat Newscoop\Entity\Language

getLanguageCode() public méthode

Get language code.
public getLanguageCode ( ) : integer
Résultat integer

getLanguageId() public méthode

Get language id.
public getLanguageId ( ) : integer
Résultat integer

getLanguageObject() public méthode

Get language object.
public getLanguageObject ( ) : Newscoop\Entity\Language
Résultat Newscoop\Entity\Language

getLockTime() public méthode

Gets the value of lockTime.
public getLockTime ( ) : DateTime
Résultat DateTime

getLockTimeDiffrence() public méthode

Gets the time difference between current and article lock time.
public getLockTimeDiffrence ( ) : array
Résultat array

getLockUser() public méthode

Gets the value of lockUser.
public getLockUser ( ) : Newscoop\Entity\User
Résultat Newscoop\Entity\User

getName() public méthode

Get article name.
public getName ( ) : string
Résultat string

getNumber() public méthode

Get number.
public getNumber ( ) : integer
Résultat integer

getObject() public méthode

public getObject ( )

getOnFrontPage() public méthode

Gets the value of onFrontPage.
public getOnFrontPage ( ) : string
Résultat string

getOnSection() public méthode

Gets the value of onSection.
public getOnSection ( ) : string
Résultat string

getPackages() public méthode

Get packages.
public getPackages ( ) : object
Résultat object

getPublic() public méthode

Gets the value of public.
public getPublic ( ) : string
Résultat string

getPublication() public méthode

Get publication.
public getPublication ( ) : Newscoop\Entity\Publication
Résultat Newscoop\Entity\Publication

getPublicationId() public méthode

Get publication id.
public getPublicationId ( ) : integer
Résultat integer

getPublishDate() public méthode

Get publishDate.
public getPublishDate ( ) : string
Résultat string

getPublished() public méthode

Get published.
public getPublished ( ) : string
Résultat string

getReads() public méthode

Set reads.
public getReads ( ) : integer
Résultat integer

getRenditions() public méthode

Get renditions.
public getRenditions ( ) : object
Résultat object

getSection() public méthode

Get section.
public getSection ( ) : Section
Résultat Section

getSectionId() public méthode

Gets the value of sectionId.
public getSectionId ( ) : integer
Résultat integer

getShortName() public méthode

Gets the value of shortName.
public getShortName ( ) : string
Résultat string

getSnippets() public méthode

Get Article Snippets.
public getSnippets ( )

getTitle() public méthode

Get title.
public getTitle ( ) : string
Résultat string

getTopicNames() public méthode

Get topic names.
public getTopicNames ( ) : array
Résultat array

getTopics() public méthode

Get topics.
public getTopics ( ) : object
Résultat object

getTranslations() public méthode

Get translations.
public getTranslations ( ) : object
Résultat object

getType() public méthode

Get type.
public getType ( ) : string
Résultat string

getUpdated() public méthode

Getter for updated.
public getUpdated ( ) : mixed
Résultat mixed

getUploaded() public méthode

Gets the value of uploaded.
public getUploaded ( ) : DateTime
Résultat DateTime

getView() public méthode

Get view.
public getView ( ) : object
Résultat object

getWebcode() public méthode

Get webcode.
public getWebcode ( ) : string
Résultat string

getWebcodeEntity() public méthode

Get webcode object.
public getWebcodeEntity ( ) : string
Résultat string

getWorkflowStatus() public méthode

Get workflowStatus.
public getWorkflowStatus ( $readable = false ) : string
Résultat string

hasWebcode() public méthode

Test if article has webcode.
public hasWebcode ( ) : boolean
Résultat boolean

isLocked() public méthode

Checks if article is locked or not.
public isLocked ( ) : boolean
Résultat boolean

isPublished() public méthode

Test if article is published.
public isPublished ( ) : boolean
Résultat boolean

publish() public méthode

* Publish article
public publish ( )

removeSnippet() public méthode

Remove a Snippet from the Article.
public removeSnippet ( Snippet $snippet ) : Newscoop\Entity\Article
$snippet Snippet the Snippet to remove
Résultat Newscoop\Entity\Article

removeTopic() public méthode

Remove a Topic from the Article.
public removeTopic ( Topic $topic ) : boolean
$topic Newscoop\NewscoopBundle\Entity\Topic the Topic to remove
Résultat boolean

setArticleAuthors() public méthode

Set articleAuthors $articleAuthors.
public setArticleAuthors ( $articleAuthors )

setArticleOrder() public méthode

Sets the value of articleOrder.
public setArticleOrder ( integer $articleOrder ) : self
$articleOrder integer the article order
Résultat self

setAttachments() public méthode

Setter for attachments.
public setAttachments ( ArrayCollection | null $attachments ) : self
$attachments Doctrine\Common\Collections\ArrayCollection | null Value to set
Résultat self

setCommentsEnabled() public méthode

Set commenting en/disabled.
public setCommentsEnabled ( integer $comments_enabled )
$comments_enabled integer

setCommentsLocked() public méthode

Setter for commentsLocked.
public setCommentsLocked ( mixed $commentsLocked ) : self
$commentsLocked mixed Value to set
Résultat self

setCreator() public méthode

Set creator.
public setCreator ( User $p_user ) : Article
$p_user User
Résultat Article

setData() public méthode

Set data.
public setData ( array $data )
$data array

setDate() public méthode

Set date.
public setDate ( DateTime $date )
$date DateTime

setFieldData() public méthode

Set article type field data.
public setFieldData ( string $field, string $value ) : mixed
$field string
$value string
Résultat mixed

setFields() public méthode

Set Fields $fields.
public setFields ( $fields )

setId() public méthode

Set article id.
public setId ( integer $p_id ) : Article
$p_id integer
Résultat Article

setImages() public méthode

Setter for images.
public setImages ( ArrayCollection $images ) : self
$images Doctrine\Common\Collections\ArrayCollection Value to set
Résultat self

setIndexed() public méthode

Set indexed.
public setIndexed ( DateTime $indexed = null ) : self
$indexed DateTime
Résultat self

setIsIndexed() public méthode

Sets the value of isIndexed.
public setIsIndexed ( boolean $isIndexed ) : self
$isIndexed boolean the is indexed
Résultat self

setIssue() public méthode

Setter for issue.
public setIssue ( Issue $issue ) : self
$issue Issue Value to set
Résultat self

setIssueId() public méthode

Sets the value of issueId.
public setIssueId ( integer $issueId ) : self
$issueId integer the issue id
Résultat self

setKeywords() public méthode

$keywords
public setKeywords ( $keywords )

setLanguage() public méthode

Set language.
public setLanguage ( Language $p_language ) : Newscoop\Entity\Article
$p_language Language
Résultat Newscoop\Entity\Article

setLockTime() public méthode

Sets the value of lockTime.
public setLockTime ( DateTime $lockTime = null ) : self
$lockTime DateTime the lock time
Résultat self

setLockUser() public méthode

Sets the value of lockUser.
public setLockUser ( User $lockUser = null ) : self
$lockUser User the lock user
Résultat self

setName() public méthode

Sets the value of name.
public setName ( string $name ) : self
$name string the name
Résultat self

setNumber() public méthode

Set number.
public setNumber ( $number ) : integer
Résultat integer

setOnFrontPage() public méthode

Sets the value of onFrontPage.
public setOnFrontPage ( string $onFrontPage = false ) : self
$onFrontPage string the on front page
Résultat self

setOnSection() public méthode

Sets the value of onSection.
public setOnSection ( string $onSection = false ) : self
$onSection string the on section
Résultat self

setPackages() public méthode

Set Packages $packages.
public setPackages ( $packages )

setPublic() public méthode

Sets the value of public.
public setPublic ( boolean $public ) : self
$public boolean the public
Résultat self

setPublication() public méthode

Set publication.
public setPublication ( Publication $p_publication ) : Article
$p_publication Publication
Résultat Article

setPublished() public méthode

Set published.
public setPublished ( Datetime | null $published ) : self
$published Datetime | null
Résultat self

setReads() public méthode

Get reads.
public setReads ( integer $reads )
$reads integer

setRenditions() public méthode

Set renditions $renditions.
public setRenditions ( $renditions )

setSection() public méthode

Setter for section.
public setSection ( Section $section ) : self
$section Section
Résultat self

setSectionId() public méthode

Sets the value of sectionId.
public setSectionId ( integer $sectionId ) : self
$sectionId integer the section id
Résultat self

setShortName() public méthode

Sets the value of shortName.
public setShortName ( string $shortName ) : self
$shortName string the short name
Résultat self

setTitle() public méthode

Set title.
public setTitle ( string $title )
$title string

setTopics() public méthode

Set Topics $topics.
public setTopics ( $topics )

setTranslations() public méthode

Set translations $translations.
public setTranslations ( $translations )

setType() public méthode

Sets the value of type.
public setType ( string $type ) : self
$type string the type
Résultat self

setUpdated() public méthode

Setter for updated.
public setUpdated ( DateTime $updated ) : self
$updated DateTime Value to set
Résultat self

setUploaded() public méthode

Sets the value of uploaded.
public setUploaded ( DateTime $uploaded ) : self
$uploaded DateTime the uploaded
Résultat self

setWebcode() public méthode

Set webcode.
public setWebcode ( Newscoop\Entity\Webcode $webcode )
$webcode Newscoop\Entity\Webcode

setWorkflowStatus() public méthode

Set workflowStatus.
public setWorkflowStatus ( $workflowStatus )

Property Details

$articleAuthors protected_oe property

Article Authors for Newscoop\Gimme.
protected object $articleAuthors
Résultat object

$articleOrder protected_oe property

protected int $articleOrder
Résultat integer

$attachments protected_oe property

protected ArrayCollection,Doctrine\Common\Collections $attachments
Résultat Doctrine\Common\Collections\ArrayCollection

$authors protected_oe property

protected Doctrine\Common\Collections\Collection $authors
Résultat Doctrine\Common\Collections\Collection

$comments protected_oe property

protected Newscoop\Entity\Comments $comments
Résultat Newscoop\Entity\Comments

$commentsLocked protected_oe property

protected int $commentsLocked
Résultat integer

$comments_count protected_oe property

protected int $comments_count
Résultat integer

$comments_enabled protected_oe property

protected int $comments_enabled
Résultat integer

$creator protected_oe property

protected Newscoop\Entity\User $creator
Résultat Newscoop\Entity\User

$data protected_oe property

protected ArticleData $data
Résultat ArticleData

$fields protected_oe property

Article fields used by Newscoop API.
protected array $fields
Résultat array

$images protected_oe property

protected ArrayCollection,Doctrine\Common\Collections $images
Résultat Doctrine\Common\Collections\ArrayCollection

$indexed protected_oe property

protected DateTime $indexed
Résultat DateTime

$isIndexed protected_oe property

protected string $isIndexed
Résultat string

$issue protected_oe property

protected Newscoop\Entity\Issue $issue
Résultat Newscoop\Entity\Issue

$issueId protected_oe property

TODO: Fix this bug. It's not Issue Id - it's issueNumber!
protected int $issueId
Résultat integer

$keywords protected_oe property

protected string $keywords
Résultat string

$language protected_oe property

protected Newscoop\Entity\Language $language
Résultat Newscoop\Entity\Language

$lockTime protected_oe property

protected DateTime $lockTime
Résultat DateTime

$lockUser protected_oe property

protected Newscoop\Entity\User $lockUser
Résultat Newscoop\Entity\User

$name protected_oe property

protected string $name
Résultat string

$number protected_oe property

protected int $number
Résultat integer

$objectId protected_oe property

protected int $objectId
Résultat integer

$onFrontPage protected_oe property

protected string $onFrontPage
Résultat string

$onSection protected_oe property

protected string $onSection
Résultat string

$packages protected_oe property

protected Newscoop\Package\Package $packages
Résultat Newscoop\Package\Package

$playlists protected_oe property

protected Newscoop\Entity\Playlist $playlists
Résultat Newscoop\Entity\Playlist

$public protected_oe property

protected string $public
Résultat string

$publication protected_oe property

protected Newscoop\Entity\Publication $publication
Résultat Newscoop\Entity\Publication

$published protected_oe property

protected DateTime $published
Résultat DateTime

$reads protected_oe property

Article reads number used by Newscoop API.
protected int $reads
Résultat integer

$renditions protected_oe property

Article renditions used by Newscoop API.
protected array $renditions
Résultat array

$section protected_oe property

protected Newscoop\Entity\Section $section
Résultat Newscoop\Entity\Section

$sectionId protected_oe property

TODO: Fix this bug. It's not section Id - it's sectionNumber!
protected int $sectionId
Résultat integer

$shortName protected_oe property

protected string $shortName
Résultat string

$snippets protected_oe property

protected ArrayCollection,Doctrine\Common\Collections $snippets
Résultat Doctrine\Common\Collections\ArrayCollection

$topics protected_oe property

protected ArrayCollection,Doctrine\Common\Collections $topics
Résultat Doctrine\Common\Collections\ArrayCollection

$translations protected_oe property

Article translations used by Newscoop API.
protected array $translations
Résultat array

$type protected_oe property

protected string $type
Résultat string

$updated protected_oe property

protected DateTime $updated
Résultat DateTime

$uploaded protected_oe property

protected DateTime $uploaded
Résultat DateTime

$webcode protected_oe property

protected Newscoop\Entity\Webcode $webcode
Résultat Newscoop\Entity\Webcode

$workflowStatus protected_oe property

protected string $workflowStatus
Résultat string