Backend\Modules\Analytics\Form\SettingsStepProfileType::build PHP Метод

build() приватный Метод

Build up the form
private build ( )
    private function build()
    {
        $profiles = $this->googleServiceAnalytics->management_profiles->listManagementProfiles($this->settings->get('Analytics', 'account'), $this->settings->get('Analytics', 'web_property_id'));
        $profilesForDropDown = [];
        foreach ($profiles->getItems() as $property) {
            $profilesForDropDown[$property->getId()] = $property->getName();
        }
        $this->form->addDropdown('profile', $profilesForDropDown);
    }