EC-CUBE4 APIドキュメント

Block extends AbstractEntity

Block

Tags
ORM\Table

(name="dtb_block", uniqueConstraints={@ORM\UniqueConstraint (name="device_type_id", columns={"device_type_id", "file_name"})})

ORM\InheritanceType

("SINGLE_TABLE")

ORM\DiscriminatorColumn

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

ORM\HasLifecycleCallbacks

()

ORM\Entity

(repositoryClass="Eccube\Repository\BlockRepository")

Table of Contents

UNUSED_BLOCK_ID 0
$id int
$name string|null
$file_name string
$use_controller bool
$deletable bool
$create_date DateTime
$update_date DateTime
$BlockPositions Collection
$DeviceType DeviceType
$AnnotationReader
__construct() Constructor mixed
setId() Set id Block
getId() Get id int
setName() Set name Block
getName() Get name string
setFileName() Set fileName Block
getFileName() Get fileName string
setUseController() Set useController Block
isUseController() Get useController bool
setDeletable() Set deletable Block
isDeletable() Get deletable bool
setCreateDate() Set createDate Block
getCreateDate() Get createDate DateTime
setUpdateDate() Set updateDate Block
getUpdateDate() Get updateDate DateTime
addBlockPosition() Add blockPosition Block
removeBlockPosition() Remove blockPosition mixed
getBlockPositions() Get blockPositions Collection
setDeviceType() Set deviceType Block
getDeviceType() Get deviceType DeviceType
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

Constants

UNUSED_BLOCK_ID

public int $UNUSED_BLOCK_ID = ""

Properties

$id

private int $id
Tags
ORM\Column

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

ORM\Id
ORM\GeneratedValue

(strategy="IDENTITY")

$name

private string|null $name
Tags
ORM\Column

(name="block_name", type="string", length=255, nullable=true)

$file_name

private string $file_name
Tags
ORM\Column

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

$use_controller

private bool $use_controller = false
Tags
ORM\Column

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

$deletable

private bool $deletable = true
Tags
ORM\Column

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

$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")

$BlockPositions

private Collection $BlockPositions
Tags
ORM\OneToMany

(targetEntity="Eccube\Entity\BlockPosition", mappedBy="Block", cascade={"persist","remove"})

$DeviceType

private DeviceType $DeviceType
Tags
ORM\ManyToOne

(targetEntity="Eccube\Entity\Master\DeviceType")

ORM\JoinColumns

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

Methods

__construct()

Constructor

public __construct( ) : mixed
Return values
mixed

setId()

Set id

public setId( $id : int ) : Block
Parameters
$id : int
Return values
Block

getId()

Get id

public getId( ) : int
Return values
int

setName()

Set name

public setName( $name : string ) : Block
Parameters
$name : string
Return values
Block

getName()

Get name

public getName( ) : string
Return values
string

setFileName()

Set fileName

public setFileName( $fileName : string ) : Block
Parameters
$fileName : string
Return values
Block

getFileName()

Get fileName

public getFileName( ) : string
Return values
string

setUseController()

Set useController

public setUseController( $useController : bool ) : Block
Parameters
$useController : bool
Return values
Block

isUseController()

Get useController

public isUseController( ) : bool
Return values
bool

setDeletable()

Set deletable

public setDeletable( $deletable : bool ) : Block
Parameters
$deletable : bool
Return values
Block

isDeletable()

Get deletable

public isDeletable( ) : bool
Return values
bool

setCreateDate()

Set createDate

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

getCreateDate()

Get createDate

public getCreateDate( ) : DateTime
Return values
DateTime

setUpdateDate()

Set updateDate

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

getUpdateDate()

Get updateDate

public getUpdateDate( ) : DateTime
Return values
DateTime

removeBlockPosition()

Remove blockPosition

public removeBlockPosition( $blockPosition : BlockPosition ) : mixed
Parameters
$blockPosition : BlockPosition
Return values
mixed

getBlockPositions()

Get blockPositions

public getBlockPositions( ) : Collection
Return values
Collection

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