PHP Класс PartKeepr\StockBundle\Entity\StockEntry

Наследование: extends PartKeepr\CoreBundle\Entity\BaseEntity
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( ) Creates a new stock entry. A stock entry tracks how many parts were the stockLevel is the amount of items added/removed, by which user and how much the user paid for it (for adding parts only!).
checkPrice ( ) If the stock level is negative, we can't have a price.
getComment ( ) : string Returns the comment.
getCorrection ( ) : boolean Returns if the entry is a correction entry.
getDateTime ( ) : DateTime Returns the date+time when the record was created.
getPart ( ) : Part Returns the part assigned to this entry.
getPrice ( ) : float Returns the price for this entry. The price is for a single item only.
getStockLevel ( ) : integer Returns the stock level for this entry.
getUser ( ) : User Returns the user for this entry.
isRemoval ( ) : boolean Returns if the current stock entry is a removal.
setComment ( string $comment ) Sets a comment.
setCorrection ( $bCorrection ) Sets if the stock entry is a correction record.
setPart ( Part $part = null ) Sets the part assigned to this entry.
setPrice ( float $price ) Sets the price for the item stored.
setStockLevel ( integer $stockLevel ) Sets the stock level for this entry.
setUser ( User $user = null ) Sets the user assigned to this entry.

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

Метод Описание
setDateTime ( DateTime $dateTime ) Sets the date+time.

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

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

Creates a new stock entry. A stock entry tracks how many parts were the stockLevel is the amount of items added/removed, by which user and how much the user paid for it (for adding parts only!).
public __construct ( )

checkPrice() публичный Метод

If the stock level is negative, we can't have a price.
public checkPrice ( )

getComment() публичный Метод

Returns the comment.
public getComment ( ) : string
Результат string The comment

getCorrection() публичный Метод

Returns if the entry is a correction entry.
public getCorrection ( ) : boolean
Результат boolean True if the entry is a correction entry, false otherwise

getDateTime() публичный Метод

Returns the date+time when the record was created.
public getDateTime ( ) : DateTime
Результат DateTime The date+time when the record was created

getPart() публичный Метод

Returns the part assigned to this entry.
public getPart ( ) : Part
Результат PartKeepr\PartBundle\Entity\Part $part The part

getPrice() публичный Метод

Returns the price for this entry. The price is for a single item only.
public getPrice ( ) : float
Результат float The price for this entry.

getStockLevel() публичный Метод

Returns the stock level for this entry.
public getStockLevel ( ) : integer
Результат integer The stock level

getUser() публичный Метод

Returns the user for this entry.
public getUser ( ) : User
Результат PartKeepr\AuthBundle\Entity\User the user

isRemoval() публичный Метод

Returns if the current stock entry is a removal.
public isRemoval ( ) : boolean
Результат boolean True if the entry is a removal, false otherwise

setComment() публичный Метод

Sets a comment.
public setComment ( string $comment )
$comment string

setCorrection() публичный Метод

Sets if the stock entry is a correction record.
public setCorrection ( $bCorrection )
$bCorrection boolean True if the record is a correction record, false otherwise

setPart() публичный Метод

Sets the part assigned to this entry.
public setPart ( Part $part = null )
$part PartKeepr\PartBundle\Entity\Part The part to set

setPrice() публичный Метод

Please note that the price is for a single item only, and can be null.
public setPrice ( float $price )
$price float The price to set

setStockLevel() публичный Метод

Negative values means part removal, positive values means part adding.
public setStockLevel ( integer $stockLevel )
$stockLevel integer The stock level

setUser() публичный Метод

Sets the user assigned to this entry.
public setUser ( User $user = null )
$user PartKeepr\AuthBundle\Entity\User The user The user to set