Skip to content

Work Product documentation

Documentation for work product subclass

Have to implements (interface)

add to your product (or replace GeneralProductInterface)

... implements \BP\Products\Work\WorkInterface

participation(): array

/**
 * Get insurance participation
 *
 * @return array
 */
public function participation(): array
{
    return [
        PARTIC_PERCENT => 5,
        PARTIC_SUM => 165,
    ];
}

territory(): string

/**
 * Get product territory
 *
 * @return string
 */
public function territory(): string
{
    return 'Európa';
}

Inherited from WorkProduct class

Methods and properties you can use from main class

Properties

Methods

employerData(): Person

/**
 * Get employer person data
 *
 * @return Person
 */

insuranceAmount(): int

/**
 * Get insurance amount/sum
 *
 * @return int
 */

insuredData(): Person

/**
 * Get insured person data
 *
 * @return Person
 */

setInsuranceAmount(int $sum)

/**
 * Set insurance amount/sum (required to use in prices())
 *
 * @param int $sum
 */