Contao\Versions::__construct PHP Method

__construct() public method

Initialize the object
public __construct ( string $strTable, integer $intPid )
$strTable string
$intPid integer
    public function __construct($strTable, $intPid)
    {
        $this->import('Database');
        parent::__construct();
        $this->strTable = $strTable;
        $this->intPid = $intPid;
        // Store the path if it is an editable file
        if ($strTable == 'tl_files') {
            $objFile = \FilesModel::findByPk($intPid);
            if ($objFile !== null && in_array($objFile->extension, \StringUtil::trimsplit(',', strtolower(\Config::get('editableFiles'))))) {
                $this->strPath = $objFile->path;
            }
        }
    }