PHP Class PartKeepr\PartBundle\Entity\PartMeasurementUnit

Inheritance: extends PartKeepr\CoreBundle\Entity\BaseEntity
Afficher le fichier Open project: partkeepr/PartKeepr Class Usage Examples

Méthodes publiques

Méthode 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 méthode

Sets the default to false.
public __construct ( )

getName() public méthode

Returns the name for this unit.
public getName ( ) : string
Résultat string The name for this unit

getParts() public méthode

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

getShortName() public méthode

Returns the short name for this unit.
public getShortName ( ) : string
Résultat string The short name for this unit

isDefault() public méthode

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

setDefault() public méthode

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

setName() public méthode

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

setShortName() public méthode

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