Block/Customer/Account/Books.php
public function getAdditionalBooksToShow()
    {
        $additionalBooksToShow = [];
        $processedAddressBooks = [];
        $additionalFromConfig = $this->helper->getAddressBookIdsToShow($this->getCustomer()->getStore()->getWebsite());
        $contactFromTable = $this->getContactFromTable();
        if (! empty($additionalFromConfig) && $contactFromTable->getContactId()) {
            $contact = $this->getConnectorContact();
            if (isset($contact->id) && $contact->status !== 'PendingOptIn') {
                $addressBooks = $this->_getApiClient()
                    ->getContactAddressBooks(
                        $contact->id
                    );
                if (is_array($addressBooks)) {
                    foreach ($addressBooks as $addressBook) {
                        $processedAddressBooks[$addressBook->id]
                            = $addressBook->name;
                    }
                }
            }
        }

        return $this->getProcessedAdditionalBooks(
            $additionalFromConfig,
            $processedAddressBooks,
            $additionalBooksToShow
        );
    }
public function getAdditionalBooksToShow()
    {
        $additionalBooksToShow = [];
        $processedAddressBooks = [];
        $additionalFromConfig = $this->helper->getAddressBookIdsToShow($this->getCustomer()->getStore()->getWebsite());
        $contactFromTable = $this->getContactFromTable();
        if (! empty($additionalFromConfig) && $contactFromTable->getContactId()) {
            $contact = $this->getConnectorContact();
            if (isset($contact->id) && $contact->status !== 'PendingOptIn') {
                $addressBooks = $this->_getApiClient()
                    ->getContactAddressBooks(
                        $contact->id
                    );
                if (is_array($addressBooks)) {
                    foreach ($addressBooks as $addressBook) {
                        $processedAddressBooks[$addressBook->id]
                            = $addressBook->name;
                    }
                }
            }
        }

        return $this->getProcessedAdditionalBooks(
            $additionalFromConfig,
            $processedAddressBooks,
            $additionalBooksToShow
        );
    }
public function getAdditionalBooksToShow ( ) { $ additionalBooksToShow = [ ] ; $ processedAddressBooks = [ ] ; $ additionalFromConfig = $ this -> helper -> getAddressBookIdsToShow ( $ this -> getCustomer ( ) -> getStore ( ) -> getWebsite ( ) ) ; $ contactFromTable = $ this -> getContactFromTable ( ) ; if ( ! empty ( $ additionalFromConfig ) && $ contactFromTable -> getContactId ( ) ) { $ contact = $ this -> getConnectorContact ( ) ; if ( isset ( $ contact -> id ) && $ contact -> status !== 'PendingOptIn' ) { $ addressBooks = $ this -> _getApiClient ( ) -> getContactAddressBooks ( $ contact -> id ) ; if ( is_array ( $ addressBooks ) ) { foreach ( $ addressBooks as $ addressBook ) { $ processedAddressBooks [ $ addressBook -> id ] = $ addressBook -> name ; } } } } return $ this -> getProcessedAdditionalBooks ( $ additionalFromConfig , $ processedAddressBooks , $ additionalBooksToShow ) ; }
Getter for additional books. Fully processed.

@return array
Getter for additional books . Fully processed .