PHP code example of derhaeuptling / contao-immobilienscout24-import-bundle

1. Go to this page and download the library: Download derhaeuptling/contao-immobilienscout24-import-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

derhaeuptling / contao-immobilienscout24-import-bundle example snippets


  /** var Derhaeuptling\ContaoImmoscout24\Entity\RealEstate $realEstate */
  $realEstate

  $this->attributes

  // array [name => label] of publicly accessible fields of the real estate objects
  // e.g. 'descriptionNote' that can be accessed via $realEstate->descriptionNote

  $this->hasData(RealEstate $realEstate, string $attribute) : bool
  // will return wether $realEstate holds data for the $attribute

  $this->getFormatted(RealEstate $realEstate, string $attribute) : string
  // will return the formatted value of $attribute - enumerations, dates and
  // booleans will resolved to a string representation based on the language
  // files

  FLAG__TYPE_A = 1;
  FLAG__TYPE_B = 2;
  FLAG__TYPE_C = 4;
  FLAG__TYPE_D = 8;
  FLAG__TYPE_E = 16;

  // n-of-value selecting 'type A' and 'type E'
  $value = -(FLAG__TYPE_A | FLAG__TYPE_E); // = 17

  $figure = $this->getFigureFromAttachment($realEstate->getTitlePictureAttachment());

  $figure = $this->getFigureFromAttachment(
      $realEstate->getTitlePictureAttachment(),
      $this->alternativeImageSize
  );

  $this->insert('image', $titlePictureFigure->getLegacyTemplateData());

    <div>
        <h2>Title Picture</h2>
         if(null !== ($titlePictureFigure = $this->getFigureFromAttachment($this->realEstate->getTitlePictureAttachment()))):