PHP Class PartKeepr\PartBundle\Entity\PartMeasurementUnit

Inheritance: extends PartKeepr\CoreBundle\Entity\BaseEntity
Exibir arquivo Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method Description
__construct ( ) Creates a new part unit.
getName ( ) : string Returns the name for this unit.
getParts ( ) : ArrayCollection Returns the parts for this PartUnit.
getShortName ( ) : string Returns the short name for this unit.
isDefault ( ) : boolean Returns if the unit is default or not.
setDefault ( boolean $default ) Defines if the unit is default or not.
setName ( string $name ) Sets the name for this unit.
setShortName ( string $shortName ) Sets the short name for this unit.

Method Details

__construct() public method

Sets the default to false.
public __construct ( )

getName() public method

Returns the name for this unit.
public getName ( ) : string
return string The name for this unit

getParts() public method

Returns the parts for this PartUnit.
public getParts ( ) : ArrayCollection
return Doctrine\Common\Collections\ArrayCollection

getShortName() public method

Returns the short name for this unit.
public getShortName ( ) : string
return string The short name for this unit

isDefault() public method

Returns if the unit is default or not.
public isDefault ( ) : boolean
return boolean True if the unit is default, false for not

setDefault() public method

Defines if the unit is default or not.
public setDefault ( boolean $default )
$default boolean True if the unit is default, false otherwise

setName() public method

Sets the name for this unit.
public setName ( string $name )
$name string The name for this unit

setShortName() public method

Short names are used for list views (e.g. if your unit name is "metres", your short name could be "m")
public setShortName ( string $shortName )
$shortName string The short name