EC-CUBE4 APIドキュメント

News extends AbstractEntity

News

Tags
ORM\Table

(name="dtb_news")

ORM\InheritanceType

("SINGLE_TABLE")

ORM\DiscriminatorColumn

(name="discriminator_type", type="string", length=255)

ORM\HasLifecycleCallbacks

()

ORM\Entity

(repositoryClass="Eccube\Repository\NewsRepository")

ORM\Cache

(usage="NONSTRICT_READ_WRITE")

Table of Contents

$id int
$publish_date DateTime|null
$title string
$description string|null
$url string|null
$link_method bool
$create_date DateTime
$update_date DateTime
$visible bool
$Creator Member
$AnnotationReader
__toString() string
getId() Get id. int
setPublishDate() Set publishDate. News
getPublishDate() Get publishDate. DateTime|null
setTitle() Set title. News
getTitle() Get title. string
setDescription() Set description. News
getDescription() Get description. string|null
setUrl() Set url. News
getUrl() Get url. string|null
setLinkMethod() Set linkMethod. News
isLinkMethod() Get linkMethod. bool
setCreateDate() Set createDate. News
getCreateDate() Get createDate. DateTime
setUpdateDate() Set updateDate. News
getUpdateDate() Get updateDate. DateTime
isVisible() int
setVisible() News
setCreator() Set creator. News
getCreator() Get creator. Member|null
offsetExists() mixed
offsetSet() mixed
offsetGet() mixed
offsetUnset() mixed
setPropertiesFromArray() 引数の連想配列を元にプロパティを設定します. mixed
toArray() Convert to associative array. array
toNormalizedArray() Convert to associative array, and normalize to association properties. array
toJSON() Convert to JSON. string
toXML() Convert to XML. string
copyProperties() コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー AbstractEntity
setAnnotationReader() Set AnnotationReader. AbstractEntity
getAnnotationReader() Get AnnotationReader. Reader
getEntityIdentifierAsArray() Convert to Entity of Identity value to associative array. array

Properties

$id

private int $id
Tags
ORM\Column

(name="id", type="integer", options={"unsigned":true})

ORM\Id
ORM\GeneratedValue

(strategy="IDENTITY")

$publish_date

private DateTime|null $publish_date
Tags
ORM\Column

(name="publish_date", type="datetimetz", nullable=true)

$title

private string $title
Tags
ORM\Column

(name="title", type="string", length=255)

$description

private string|null $description
Tags
ORM\Column

(name="description", type="text", nullable=true)

$url

private string|null $url
Tags
ORM\Column

(name="url", type="string", length=4000, nullable=true)

$link_method

private bool $link_method = false
Tags
ORM\Column

(name="link_method", type="boolean", options={"default":false})

$create_date

private DateTime $create_date
Tags
ORM\Column

(name="create_date", type="datetimetz")

$update_date

private DateTime $update_date
Tags
ORM\Column

(name="update_date", type="datetimetz")

$visible

private bool $visible
Tags
ORM\Column

(name="visible", type="boolean", options={"default":true})

$Creator

private Member $Creator
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Member")

ORM\JoinColumns

({ @ORM\JoinColumn(name="creator_id", referencedColumnName="id") })

Methods

__toString()

public __toString( ) : string
Return values
string

getId()

Get id.

public getId( ) : int
Return values
int

setPublishDate()

Set publishDate.

public setPublishDate( [ $publishDate : DateTime|null = null ] ) : News
Parameters
$publishDate : DateTime|null = null
Return values
News

getPublishDate()

Get publishDate.

public getPublishDate( ) : DateTime|null
Return values
DateTime|null

setTitle()

Set title.

public setTitle( $title : string ) : News
Parameters
$title : string
Return values
News

getTitle()

Get title.

public getTitle( ) : string
Return values
string

setDescription()

Set description.

public setDescription( [ $description : string|null = null ] ) : News
Parameters
$description : string|null = null
Return values
News

getDescription()

Get description.

public getDescription( ) : string|null
Return values
string|null

setUrl()

Set url.

public setUrl( [ $url : string|null = null ] ) : News
Parameters
$url : string|null = null
Return values
News

getUrl()

Get url.

public getUrl( ) : string|null
Return values
string|null

setLinkMethod()

Set linkMethod.

public setLinkMethod( $linkMethod : bool ) : News
Parameters
$linkMethod : bool
Return values
News

isLinkMethod()

Get linkMethod.

public isLinkMethod( ) : bool
Return values
bool

setCreateDate()

Set createDate.

public setCreateDate( $createDate : DateTime ) : News
Parameters
$createDate : DateTime
Return values
News

getCreateDate()

Get createDate.

public getCreateDate( ) : DateTime
Return values
DateTime

setUpdateDate()

Set updateDate.

public setUpdateDate( $updateDate : DateTime ) : News
Parameters
$updateDate : DateTime
Return values
News

getUpdateDate()

Get updateDate.

public getUpdateDate( ) : DateTime
Return values
DateTime

isVisible()

public isVisible( ) : int
Return values
int

setVisible()

public setVisible( $visible : bool ) : News
Parameters
$visible : bool
Return values
News

setCreator()

Set creator.

public setCreator( [ $creator : Member|null = null ] ) : News
Parameters
$creator : Member|null = null
Return values
News

getCreator()

Get creator.

public getCreator( ) : Member|null
Return values
Member|null

offsetExists()

public offsetExists( $offset : mixed ) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet( $offset : mixed , $value : mixed ) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetGet()

public offsetGet( $offset : mixed ) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetUnset()

public offsetUnset( $offset : mixed ) : mixed
Parameters
$offset : mixed
Return values
mixed

setPropertiesFromArray()

引数の連想配列を元にプロパティを設定します.

public setPropertiesFromArray( $arrProps : array [, $excludeAttribute : string[] = [] ] [, $parentClass : ReflectionClass = null ] ) : mixed

DBから取り出した連想配列を, プロパティへ設定する際に使用します.

Parameters
$arrProps : array

プロパティの情報を格納した連想配列

$excludeAttribute : string[] = []

除外したいフィールド名の配列

$parentClass : ReflectionClass = null

親のクラス. 本メソッドの内部的に使用します.

Return values
mixed

toArray()

Convert to associative array.

public toArray( [ $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ] [, $parentClass : ReflectionClass = null ] ) : array

Symfony Serializer Component is expensive, and hard to implementation. Use for encoder only.

Parameters
$excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']

Array of field names to exclusion.

$parentClass : ReflectionClass = null

parent class. Use internally of this method..

Return values
array

toNormalizedArray()

Convert to associative array, and normalize to association properties.

public toNormalizedArray( [ $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ] ) : array

The type conversion such as:

  • Datetime :: W3C datetime format string
  • AbstractEntity :: associative array such as [id => value]
  • PersistentCollection :: associative array of [[id => value], [id => value], ...]
Parameters
$excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']

Array of field names to exclusion.

Return values
array

toJSON()

Convert to JSON.

public toJSON( [ $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ] ) : string
Parameters
$excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']

Array of field names to exclusion.

Return values
string

toXML()

Convert to XML.

public toXML( [ $excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader'] ] ) : string
Parameters
$excludeAttribute : array = ['__initializer__', '__cloner__', '__isInitialized__', 'AnnotationReader']

Array of field names to exclusion.

Return values
string

copyProperties()

コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー

public copyProperties( $srcObject : object [, $excludeAttribute : string[] = [] ] ) : AbstractEntity
Parameters
$srcObject : object

コピー元のオブジェクト

$excludeAttribute : string[] = []

除外したいフィールド名の配列

Return values
AbstractEntity

getAnnotationReader()

Get AnnotationReader.

public getAnnotationReader( ) : Reader
Return values
Reader

getEntityIdentifierAsArray()

Convert to Entity of Identity value to associative array.

public getEntityIdentifierAsArray( $Entity : AbstractEntity ) : array
Parameters
$Entity : AbstractEntity
Return values
array

associative array of [[id => value], [id => value], ...]

Search results