system/modules/pct_themer/PCT/ThemeDesigner/Model.php line 47

Open in your IDE?
  1. <?php
  2. /**
  3.  * Contao Open Source CMS
  4.  * 
  5.  * Copyright (C) 2005-2013 Leo Feyer
  6.  * 
  7.  * @copyright    Tim Gatzky 2016, Premium Contao Themes
  8.  * @author        Tim Gatzky <info@tim-gatzky.de>
  9.  * @package        pct_themer
  10.  */
  11. /**
  12.  * Namespace
  13.  */
  14. namespace PCT\ThemeDesigner;
  15. /**
  16.  * Class file
  17.  * Model
  18.  */
  19. class Model extends \Contao\Model
  20. {
  21.     /**
  22.      * Table
  23.      * @var string
  24.      */
  25.     protected static $strTable 'tl_pct_themedesigner';
  26.     
  27.     
  28.     /**
  29.      * Find the active themedesigner version
  30.      * @param array
  31.      * @return object
  32.      */
  33.     public static function findActive($arrOptions=array())
  34.     {
  35.         return static::findBy(array(static::$strTable.'.active=?'),array(1),$arrOptions);
  36.     }
  37.     
  38.     
  39.     /**
  40.      * Find the active themedesigner version by a theme name
  41.      * @param string
  42.      * @return object
  43.      */
  44.     public static function findActiveByTheme($strValue,$arrOptions=array())
  45.     {
  46.         return static::findBy(array(static::$strTable.'.active=?',static::$strTable.'.theme=?'),array(1,$strValue),$arrOptions);
  47.     }
  48.     
  49.     
  50.     /**
  51.      * Find all themedesigner records by a theme
  52.      * @param string
  53.      * @param array
  54.      * @return object
  55.      */
  56.     public static function findByTheme($strValue,$arrOptions=array())
  57.     {
  58.         return static::findBy(array(static::$strTable.'.theme=?'),array($strValue),$arrOptions);
  59.     }
  60. }