PHP Class PartKeepr\PartBundle\Services\PartService

Show file Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method Description
__construct ( EntityManager $entityManager, $partLimit = false, $checkInternalPartNumberUniqueness = false )
checkPartLimit ( ) : boolean Checks if the amount of parts is exceeded.
getPartCount ( ) : mixed Returns the number of parts present in the system.
isInternalPartNumberUnique ( string $internalPartNumber, Part $part = null ) : boolean Checks if the given internal part number is unique

Method Details

__construct() public method

public __construct ( EntityManager $entityManager, $partLimit = false, $checkInternalPartNumberUniqueness = false )
$entityManager Doctrine\ORM\EntityManager

checkPartLimit() public method

Checks if the amount of parts is exceeded.
public checkPartLimit ( ) : boolean
return boolean

getPartCount() public method

Returns the number of parts present in the system.
public getPartCount ( ) : mixed
return mixed

isInternalPartNumberUnique() public method

Checks if the given internal part number is unique
public isInternalPartNumberUnique ( string $internalPartNumber, Part $part = null ) : boolean
$internalPartNumber string The internal part number to checkl
$part PartKeepr\PartBundle\Entity\Part An optional part to exclude within the check
return boolean