Skip to content

Home Product documentation

Documentation for work product subclass

Have to implements (interface)

add to your product (or replace GeneralProductInterface)

... implements \BP\Products\Home\HomeInterface

coverage(): array

/**
 * Return product coverages
 *
 * @return array
 */
public function coverage(): array
{
    return [
        COVERAGE_PROPERTY => 100000,
        COVERAGE_HOUSEHOLD => 25000,
        COVERAGE_GARAGE => 10000,
        COVERAGE_RESP_HOMEOWNERS => 10000,
        COVERAGE_RESP_BUILDING => 30000,
        COVERAGE_ACC_BUILDING => 40000
    ];
}

participation(): array

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

Inherited from HomeProduct class

Methods and properties you can use from main class

Properties

Methods

buildings(bool $withGarage = false): DataObject[]

/**
 * Helper method to get array or all accessory buildings
 *
 * Object values
 * ->type (CODELIST_ACCESSORY_BUILDINGS)
 * ->typeText - text value of type
 * ->price
 * ->area
 *
 * @param boolean $withGarage
 * @return DataObject[]
 */

buildingsInsTotal(bool $withGarage = false): int

/**
 * Get total insurance amount of accessory buildings
 *
 * @param boolean $withGarage
 * @return integer
 */

garageData(): DataObject|false

Field::BLOCK_GARAGE

/**
 * Get garage data if wants to insure garage
 *
 * Object values
 * ->price
 * ->area
 * ->same (boolean)
 * ->connected (boolean)
 * [Field::HOME_STATE] (HOME_STATE_FINISHED / HOME_STATE_UNFINISHED) - optional , add to required fields
 * ->address (Address object, if same returns place of insurance address)
 *
 * @return DataObject|false
 */

insuredData(): Person

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

isOccupied(): bool

/**
 * Detect if property is occupied
 *
 * @return boolean
 */

isUsedBy(int $by): bool

/**
 * Detect if property is used by
 *
 * @param int $by (USED_BY_OWNER|USED_BY_RELATIVE|USED_BY_OTHER)
 * @return boolean
 */

parcelParts(): Address

/**
 * Get place of insurance parcel separated into parts + removed "empty" /0 values
 *
 * @return array
 *
 *  Example
 *      if parcel is 1425/0,111/22,155/05,222/0
 *      returns
 *      [
 *          'part1' => '1425',              // Parcelne číslo
 *          'part2' => '',                  // Diel parcelneho cisla
 *          'other' => '111/22,155/05,222'  // iné parcely v jednotnom funkčnom celku
 *          'clear' => '1425,111/22,155/05,222'  // Celá parcela bez /0 hodnôt
 *      ]
 */

placeOfInsurance(): Address

/**
 * Get place of insurance
 *
 * @return Address
 */

wantsToInsureHousehold(): bool

/**
 * Detect if wants to insure household
 *
 * @return boolean
 */

wantsToInsureProperty(): bool

/**
 * Detect if wants to insure property
 *
 * @return boolean
 */