PHP Класс Newscoop\Entity\Article

Наследование: implements Newscoop\Search\DocumentInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
addFields ( ArticleView $view ) : array Add field properties to view.
initArticleData ( ) : ArticleData Init ArticleData.
setFieldValue ( string $field, string $value ) Set article type field value.

Описание методов

__construct() публичный метод

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

addAttachment() публичный метод

Setter for attachments.
public addAttachment ( Attachment $attachment ) : self
$attachment Attachment
Результат self

addSnippet() публичный метод

Add a Snippet to the Article.
public addSnippet ( Snippet $snippet ) : Newscoop\Entity\Article
$snippet Snippet the Snippet to attach
Результат Newscoop\Entity\Article

addTopic() публичный метод

Add Topic to the Article.
public addTopic ( Topic $topic ) : boolean
$topic Newscoop\NewscoopBundle\Entity\Topic the Topic to attach
Результат boolean

author() публичный метод

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

commentsEnabled() публичный метод

Get whether commenting is enabled.
public commentsEnabled ( ) : integer
Результат integer

commentsLocked() публичный метод

Getter for commentsLocked.
public commentsLocked ( ) : mixed
Результат mixed

getArticleAuthors() публичный метод

Get articleAuthors.
public getArticleAuthors ( ) : object
Результат object

getArticleOrder() публичный метод

Gets the value of articleOrder.
public getArticleOrder ( ) : integer
Результат integer

getAttachments() публичный метод

Getter for attachments.
public getAttachments ( ) : ArrayCollection
Результат Doctrine\Common\Collections\ArrayCollection

getCommentsEnabled() публичный метод

Get whether commenting is enabled.
public getCommentsEnabled ( ) : integer
Результат integer

getCommentsLocked() публичный метод

Getter for commentsLocked.
public getCommentsLocked ( ) : mixed
Результат mixed

getCreator() публичный метод

Get creator.
public getCreator ( ) : Newscoop\Entity\User
Результат Newscoop\Entity\User

getData() публичный метод

Get article type field data.
public getData ( string $field ) : mixed
$field string
Результат mixed

getDate() публичный метод

Get date.
public getDate ( ) : string
Результат string

getFieldNames() публичный метод

Get all field names for this article type.
public getFieldNames ( ) : mixed
Результат mixed Returns array with field names or null

getFields() публичный метод

Get fields.
public getFields ( ) : object
Результат object

getFirstImage() публичный метод

Get article first image.
public getFirstImage ( ) : Newscoop\Image\LocalImage
Результат Newscoop\Image\LocalImage

getId() публичный метод

Get article id.
public getId ( ) : integer
Результат integer

getImages() публичный метод

Getter for images.
public getImages ( ) : ArrayCollection
Результат Doctrine\Common\Collections\ArrayCollection

getIndexed() публичный метод

Get indexed.
public getIndexed ( ) : DateTime
Результат DateTime

getIsIndexed() публичный метод

Gets the value of isIndexed.
public getIsIndexed ( ) : string
Результат string

getIssue() публичный метод

Getter for issue.
public getIssue ( ) : Issue
Результат Issue

getIssueId() публичный метод

Gets the value of issueId.
public getIssueId ( ) : integer
Результат integer

getKeywords() публичный метод

Get keywords.
public getKeywords ( ) : string
Результат string

getLanguage() публичный метод

Get language.
public getLanguage ( ) : Newscoop\Entity\Language
Результат Newscoop\Entity\Language

getLanguageCode() публичный метод

Get language code.
public getLanguageCode ( ) : integer
Результат integer

getLanguageId() публичный метод

Get language id.
public getLanguageId ( ) : integer
Результат integer

getLanguageObject() публичный метод

Get language object.
public getLanguageObject ( ) : Newscoop\Entity\Language
Результат Newscoop\Entity\Language

getLockTime() публичный метод

Gets the value of lockTime.
public getLockTime ( ) : DateTime
Результат DateTime

getLockTimeDiffrence() публичный метод

Gets the time difference between current and article lock time.
public getLockTimeDiffrence ( ) : array
Результат array

getLockUser() публичный метод

Gets the value of lockUser.
public getLockUser ( ) : Newscoop\Entity\User
Результат Newscoop\Entity\User

getName() публичный метод

Get article name.
public getName ( ) : string
Результат string

getNumber() публичный метод

Get number.
public getNumber ( ) : integer
Результат integer

getObject() публичный метод

public getObject ( )

getOnFrontPage() публичный метод

Gets the value of onFrontPage.
public getOnFrontPage ( ) : string
Результат string

getOnSection() публичный метод

Gets the value of onSection.
public getOnSection ( ) : string
Результат string

getPackages() публичный метод

Get packages.
public getPackages ( ) : object
Результат object

getPublic() публичный метод

Gets the value of public.
public getPublic ( ) : string
Результат string

getPublication() публичный метод

Get publication.
public getPublication ( ) : Newscoop\Entity\Publication
Результат Newscoop\Entity\Publication

getPublicationId() публичный метод

Get publication id.
public getPublicationId ( ) : integer
Результат integer

getPublishDate() публичный метод

Get publishDate.
public getPublishDate ( ) : string
Результат string

getPublished() публичный метод

Get published.
public getPublished ( ) : string
Результат string

getReads() публичный метод

Set reads.
public getReads ( ) : integer
Результат integer

getRenditions() публичный метод

Get renditions.
public getRenditions ( ) : object
Результат object

getSection() публичный метод

Get section.
public getSection ( ) : Section
Результат Section

getSectionId() публичный метод

Gets the value of sectionId.
public getSectionId ( ) : integer
Результат integer

getShortName() публичный метод

Gets the value of shortName.
public getShortName ( ) : string
Результат string

getSnippets() публичный метод

Get Article Snippets.
public getSnippets ( )

getTitle() публичный метод

Get title.
public getTitle ( ) : string
Результат string

getTopicNames() публичный метод

Get topic names.
public getTopicNames ( ) : array
Результат array

getTopics() публичный метод

Get topics.
public getTopics ( ) : object
Результат object

getTranslations() публичный метод

Get translations.
public getTranslations ( ) : object
Результат object

getType() публичный метод

Get type.
public getType ( ) : string
Результат string

getUpdated() публичный метод

Getter for updated.
public getUpdated ( ) : mixed
Результат mixed

getUploaded() публичный метод

Gets the value of uploaded.
public getUploaded ( ) : DateTime
Результат DateTime

getView() публичный метод

Get view.
public getView ( ) : object
Результат object

getWebcode() публичный метод

Get webcode.
public getWebcode ( ) : string
Результат string

getWebcodeEntity() публичный метод

Get webcode object.
public getWebcodeEntity ( ) : string
Результат string

getWorkflowStatus() публичный метод

Get workflowStatus.
public getWorkflowStatus ( $readable = false ) : string
Результат string

hasWebcode() публичный метод

Test if article has webcode.
public hasWebcode ( ) : boolean
Результат boolean

isLocked() публичный метод

Checks if article is locked or not.
public isLocked ( ) : boolean
Результат boolean

isPublished() публичный метод

Test if article is published.
public isPublished ( ) : boolean
Результат boolean

publish() публичный метод

* Publish article
public publish ( )

removeSnippet() публичный метод

Remove a Snippet from the Article.
public removeSnippet ( Snippet $snippet ) : Newscoop\Entity\Article
$snippet Snippet the Snippet to remove
Результат Newscoop\Entity\Article

removeTopic() публичный метод

Remove a Topic from the Article.
public removeTopic ( Topic $topic ) : boolean
$topic Newscoop\NewscoopBundle\Entity\Topic the Topic to remove
Результат boolean

setArticleAuthors() публичный метод

Set articleAuthors $articleAuthors.
public setArticleAuthors ( $articleAuthors )

setArticleOrder() публичный метод

Sets the value of articleOrder.
public setArticleOrder ( integer $articleOrder ) : self
$articleOrder integer the article order
Результат self

setAttachments() публичный метод

Setter for attachments.
public setAttachments ( ArrayCollection | null $attachments ) : self
$attachments Doctrine\Common\Collections\ArrayCollection | null Value to set
Результат self

setCommentsEnabled() публичный метод

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

setCommentsLocked() публичный метод

Setter for commentsLocked.
public setCommentsLocked ( mixed $commentsLocked ) : self
$commentsLocked mixed Value to set
Результат self

setCreator() публичный метод

Set creator.
public setCreator ( User $p_user ) : Article
$p_user User
Результат Article

setData() публичный метод

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

setDate() публичный метод

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

setFieldData() публичный метод

Set article type field data.
public setFieldData ( string $field, string $value ) : mixed
$field string
$value string
Результат mixed

setFields() публичный метод

Set Fields $fields.
public setFields ( $fields )

setId() публичный метод

Set article id.
public setId ( integer $p_id ) : Article
$p_id integer
Результат Article

setImages() публичный метод

Setter for images.
public setImages ( ArrayCollection $images ) : self
$images Doctrine\Common\Collections\ArrayCollection Value to set
Результат self

setIndexed() публичный метод

Set indexed.
public setIndexed ( DateTime $indexed = null ) : self
$indexed DateTime
Результат self

setIsIndexed() публичный метод

Sets the value of isIndexed.
public setIsIndexed ( boolean $isIndexed ) : self
$isIndexed boolean the is indexed
Результат self

setIssue() публичный метод

Setter for issue.
public setIssue ( Issue $issue ) : self
$issue Issue Value to set
Результат self

setIssueId() публичный метод

Sets the value of issueId.
public setIssueId ( integer $issueId ) : self
$issueId integer the issue id
Результат self

setKeywords() публичный метод

$keywords
public setKeywords ( $keywords )

setLanguage() публичный метод

Set language.
public setLanguage ( Language $p_language ) : Newscoop\Entity\Article
$p_language Language
Результат Newscoop\Entity\Article

setLockTime() публичный метод

Sets the value of lockTime.
public setLockTime ( DateTime $lockTime = null ) : self
$lockTime DateTime the lock time
Результат self

setLockUser() публичный метод

Sets the value of lockUser.
public setLockUser ( User $lockUser = null ) : self
$lockUser User the lock user
Результат self

setName() публичный метод

Sets the value of name.
public setName ( string $name ) : self
$name string the name
Результат self

setNumber() публичный метод

Set number.
public setNumber ( $number ) : integer
Результат integer

setOnFrontPage() публичный метод

Sets the value of onFrontPage.
public setOnFrontPage ( string $onFrontPage = false ) : self
$onFrontPage string the on front page
Результат self

setOnSection() публичный метод

Sets the value of onSection.
public setOnSection ( string $onSection = false ) : self
$onSection string the on section
Результат self

setPackages() публичный метод

Set Packages $packages.
public setPackages ( $packages )

setPublic() публичный метод

Sets the value of public.
public setPublic ( boolean $public ) : self
$public boolean the public
Результат self

setPublication() публичный метод

Set publication.
public setPublication ( Publication $p_publication ) : Article
$p_publication Publication
Результат Article

setPublished() публичный метод

Set published.
public setPublished ( Datetime | null $published ) : self
$published Datetime | null
Результат self

setReads() публичный метод

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

setRenditions() публичный метод

Set renditions $renditions.
public setRenditions ( $renditions )

setSection() публичный метод

Setter for section.
public setSection ( Section $section ) : self
$section Section
Результат self

setSectionId() публичный метод

Sets the value of sectionId.
public setSectionId ( integer $sectionId ) : self
$sectionId integer the section id
Результат self

setShortName() публичный метод

Sets the value of shortName.
public setShortName ( string $shortName ) : self
$shortName string the short name
Результат self

setTitle() публичный метод

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

setTopics() публичный метод

Set Topics $topics.
public setTopics ( $topics )

setTranslations() публичный метод

Set translations $translations.
public setTranslations ( $translations )

setType() публичный метод

Sets the value of type.
public setType ( string $type ) : self
$type string the type
Результат self

setUpdated() публичный метод

Setter for updated.
public setUpdated ( DateTime $updated ) : self
$updated DateTime Value to set
Результат self

setUploaded() публичный метод

Sets the value of uploaded.
public setUploaded ( DateTime $uploaded ) : self
$uploaded DateTime the uploaded
Результат self

setWebcode() публичный метод

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

setWorkflowStatus() публичный метод

Set workflowStatus.
public setWorkflowStatus ( $workflowStatus )

Описание свойств

$articleAuthors защищенное свойство

Article Authors for Newscoop\Gimme.
protected object $articleAuthors
Результат object

$articleOrder защищенное свойство

protected int $articleOrder
Результат integer

$attachments защищенное свойство

protected ArrayCollection,Doctrine\Common\Collections $attachments
Результат Doctrine\Common\Collections\ArrayCollection

$authors защищенное свойство

protected Doctrine\Common\Collections\Collection $authors
Результат Doctrine\Common\Collections\Collection

$comments защищенное свойство

protected Newscoop\Entity\Comments $comments
Результат Newscoop\Entity\Comments

$commentsLocked защищенное свойство

protected int $commentsLocked
Результат integer

$comments_count защищенное свойство

protected int $comments_count
Результат integer

$comments_enabled защищенное свойство

protected int $comments_enabled
Результат integer

$creator защищенное свойство

protected Newscoop\Entity\User $creator
Результат Newscoop\Entity\User

$data защищенное свойство

protected ArticleData $data
Результат ArticleData

$fields защищенное свойство

Article fields used by Newscoop API.
protected array $fields
Результат array

$images защищенное свойство

protected ArrayCollection,Doctrine\Common\Collections $images
Результат Doctrine\Common\Collections\ArrayCollection

$indexed защищенное свойство

protected DateTime $indexed
Результат DateTime

$isIndexed защищенное свойство

protected string $isIndexed
Результат string

$issue защищенное свойство

protected Newscoop\Entity\Issue $issue
Результат Newscoop\Entity\Issue

$issueId защищенное свойство

TODO: Fix this bug. It's not Issue Id - it's issueNumber!
protected int $issueId
Результат integer

$keywords защищенное свойство

protected string $keywords
Результат string

$language защищенное свойство

protected Newscoop\Entity\Language $language
Результат Newscoop\Entity\Language

$lockTime защищенное свойство

protected DateTime $lockTime
Результат DateTime

$lockUser защищенное свойство

protected Newscoop\Entity\User $lockUser
Результат Newscoop\Entity\User

$name защищенное свойство

protected string $name
Результат string

$number защищенное свойство

protected int $number
Результат integer

$objectId защищенное свойство

protected int $objectId
Результат integer

$onFrontPage защищенное свойство

protected string $onFrontPage
Результат string

$onSection защищенное свойство

protected string $onSection
Результат string

$packages защищенное свойство

protected Newscoop\Package\Package $packages
Результат Newscoop\Package\Package

$playlists защищенное свойство

protected Newscoop\Entity\Playlist $playlists
Результат Newscoop\Entity\Playlist

$public защищенное свойство

protected string $public
Результат string

$publication защищенное свойство

protected Newscoop\Entity\Publication $publication
Результат Newscoop\Entity\Publication

$published защищенное свойство

protected DateTime $published
Результат DateTime

$reads защищенное свойство

Article reads number used by Newscoop API.
protected int $reads
Результат integer

$renditions защищенное свойство

Article renditions used by Newscoop API.
protected array $renditions
Результат array

$section защищенное свойство

protected Newscoop\Entity\Section $section
Результат Newscoop\Entity\Section

$sectionId защищенное свойство

TODO: Fix this bug. It's not section Id - it's sectionNumber!
protected int $sectionId
Результат integer

$shortName защищенное свойство

protected string $shortName
Результат string

$snippets защищенное свойство

protected ArrayCollection,Doctrine\Common\Collections $snippets
Результат Doctrine\Common\Collections\ArrayCollection

$topics защищенное свойство

protected ArrayCollection,Doctrine\Common\Collections $topics
Результат Doctrine\Common\Collections\ArrayCollection

$translations защищенное свойство

Article translations used by Newscoop API.
protected array $translations
Результат array

$type защищенное свойство

protected string $type
Результат string

$updated защищенное свойство

protected DateTime $updated
Результат DateTime

$uploaded защищенное свойство

protected DateTime $uploaded
Результат DateTime

$webcode защищенное свойство

protected Newscoop\Entity\Webcode $webcode
Результат Newscoop\Entity\Webcode

$workflowStatus защищенное свойство

protected string $workflowStatus
Результат string