src/Filter/ViewModelTemplateFilterAbstract.php
protected function setOrganizationInfo()
    {
        if (!isset($this->job)) {
            throw new \InvalidArgumentException('cannot create a viewModel for Templates without a $job');
        }
        $organizationName = '';
        $organizationStreet = '';
        $organizationPostalCode = '';
        $organizationPostalCity = '';
        $organization = $this->job->getOrganization();
        $user = $this->job->getUser();

        if (isset($organization)) {
            $organizationName = $organization->getOrganizationName()->getName();
            $organizationStreet = $organization->getContact()->getStreet().' '.$organization->getContact()->getHouseNumber();
            $organizationPostalCode = $organization->getContact()->getPostalcode();
            $organizationPostalCity = $organization->getContact()->getCity();
            $organizationPhone = $organization->getContact()->getPhone();
            $organizationFax = $organization->getContact()->getFax();
        } else {
            $organizationName =
            $organizationStreet =
            $organizationPostalCode =
            $organizationPostalCity =
            $organizationPhone =
            $organizationFax = '';
        }
        $this->container['contactEmail'] = $user ? $user->getInfo()->getEmail() : '';
        $this->container['organizationName'] = $organizationName;
        $this->container['street'] = $organizationStreet;
        $this->container['postalCode'] = $organizationPostalCode;
        $this->container['city'] = $organizationPostalCity;
        $this->container['phone'] = $organizationPhone;
        $this->container['fax'] = $organizationFax;

        if (is_object($organization) && is_object($organization->getImage()) && $organization->getImage()->getUri()) {
            $this->container['uriLogo'] = $this->basePathHelper->__invoke($this->imageFileCacheHelper->getUri($organization->getImage(true)));
        } else {
            $this->container['uriLogo'] = $this->makeAbsolutePath($this->config->default_logo);
        }
        return $this;
    }
protected function setOrganizationInfo()
    {
        if (!isset($this->job)) {
            throw new \InvalidArgumentException('cannot create a viewModel for Templates without a $job');
        }
        $organizationName = '';
        $organizationStreet = '';
        $organizationPostalCode = '';
        $organizationPostalCity = '';
        $organization = $this->job->getOrganization();
        $user = $this->job->getUser();

        if (isset($organization)) {
            $organizationName = $organization->getOrganizationName()->getName();
            $organizationStreet = $organization->getContact()->getStreet().' '.$organization->getContact()->getHouseNumber();
            $organizationPostalCode = $organization->getContact()->getPostalcode();
            $organizationPostalCity = $organization->getContact()->getCity();
            $organizationPhone = $organization->getContact()->getPhone();
            $organizationFax = $organization->getContact()->getFax();
        } else {
            $organizationName =
            $organizationStreet =
            $organizationPostalCode =
            $organizationPostalCity =
            $organizationPhone =
            $organizationFax = '';
        }
        $this->container['contactEmail'] = $user ? $user->getInfo()->getEmail() : '';
        $this->container['organizationName'] = $organizationName;
        $this->container['street'] = $organizationStreet;
        $this->container['postalCode'] = $organizationPostalCode;
        $this->container['city'] = $organizationPostalCity;
        $this->container['phone'] = $organizationPhone;
        $this->container['fax'] = $organizationFax;

        if (is_object($organization) && is_object($organization->getImage()) && $organization->getImage()->getUri()) {
            $this->container['uriLogo'] = $this->basePathHelper->__invoke($this->imageFileCacheHelper->getUri($organization->getImage(true)));
        } else {
            $this->container['uriLogo'] = $this->makeAbsolutePath($this->config->default_logo);
        }
        return $this;
    }
protected function setOrganizationInfo ( ) { if ( ! isset ( $ this -> job ) ) { throw new \ InvalidArgumentException ( 'cannot create a viewModel for Templates without a $job' ) ; } $ organizationName = '' ; $ organizationStreet = '' ; $ organizationPostalCode = '' ; $ organizationPostalCity = '' ; $ organization = $ this -> job -> getOrganization ( ) ; $ user = $ this -> job -> getUser ( ) ; if ( isset ( $ organization ) ) { $ organizationName = $ organization -> getOrganizationName ( ) -> getName ( ) ; $ organizationStreet = $ organization -> getContact ( ) -> getStreet ( ) . ' ' . $ organization -> getContact ( ) -> getHouseNumber ( ) ; $ organizationPostalCode = $ organization -> getContact ( ) -> getPostalcode ( ) ; $ organizationPostalCity = $ organization -> getContact ( ) -> getCity ( ) ; $ organizationPhone = $ organization -> getContact ( ) -> getPhone ( ) ; $ organizationFax = $ organization -> getContact ( ) -> getFax ( ) ; } else { $ organizationName = $ organizationStreet = $ organizationPostalCode = $ organizationPostalCity = $ organizationPhone = $ organizationFax = '' ; } $ this -> container [ 'contactEmail' ] = $ user ? $ user -> getInfo ( ) -> getEmail ( ) : '' ; $ this -> container [ 'organizationName' ] = $ organizationName ; $ this -> container [ 'street' ] = $ organizationStreet ; $ this -> container [ 'postalCode' ] = $ organizationPostalCode ; $ this -> container [ 'city' ] = $ organizationPostalCity ; $ this -> container [ 'phone' ] = $ organizationPhone ; $ this -> container [ 'fax' ] = $ organizationFax ; if ( is_object ( $ organization ) && is_object ( $ organization -> getImage ( ) ) && $ organization -> getImage ( ) -> getUri ( ) ) { $ this -> container [ 'uriLogo' ] = $ this -> basePathHelper -> __invoke ( $ this -> imageFileCacheHelper -> getUri ( $ organization -> getImage ( true ) ) ) ; } else { $ this -> container [ 'uriLogo' ] = $ this -> makeAbsolutePath ( $ this -> config -> default_logo ) ; } return $ this ; }
Sets the organizations contact address

@return $this
@throws \InvalidArgumentException
Sets the organizations contact address