ĢByPrintable($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByCustomTpl($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByProtected($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByGroups($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByGuests($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByCssID($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findBySpace($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByPublished($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByStart($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findByStop($val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findMultipleByIds($var, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findBy($col, $val, array $opt=array()) * @method static Collection|ArticleModel[]|ArticleModel|null findAll(array $opt=array()) * * @method static integer countById($id, array $opt=array()) * @method static integer countByPid($val, array $opt=array()) * @method static integer countBySorting($val, array $opt=array()) * @method static integer countByTstamp($val, array $opt=array()) * @method static integer countByTitle($val, array $opt=array()) * @method static integer countByAlias($val, array $opt=array()) * @method static integer countByAuthor($val, array $opt=array()) * @method static integer countByInColumn($val, array $opt=array()) * @method static integer countByKeywords($val, array $opt=array()) * @method static integer countByShowTeaser($val, array $opt=array()) * @method static integer countByTeaserCssID($val, array $opt=array()) * @method static integer countByTeaser($val, array $opt=array()) * @method static integer countByPrintable($val, array $opt=array()) * @method static integer countByCustomTpl($val, array $opt=array()) * @method static integer countByProtected($val, array $opt=array()) * @method static integer countByGroups($val, array $opt=array()) * @method static integer countByGuests($val, array $opt=array()) * @method static integer countByCssID($val, array $opt=array()) * @method static integer countBySpace($val, array $opt=array()) * @method static integer countByPublished($val, array $opt=array()) * @method static integer countByStart($val, array $opt=array()) * @method static integer countByStop($val, array $opt=array()) */ class ArticleModel extends Model { /** * Table name * @var string */ protected static $strTable = 'tl_article'; /** * Find an article by its ID or alias and its page * * @param mixed $varId The numeric ID or alias name * @param integer $intPid The page ID * @param array $arrOptions An optional options array * * @return ArticleModel|null The model or null if there is no article */ public static function findByIdOrAliasAndPid($varId, $intPid, array $arrOptions=array()) { $t = static::$strTable; $arrColumns = !preg_match('/^[1-9]\d*$/', $varId) ? array("BINARY $t.alias=?") : array("$t.id=?"); $arrValues = array($varId); if ($intPid) { $arrColumns[] = "$t.pid=?"; $arrValues[] = $intPid; } return static::findOneBy($arrColumns, $arrValues, $arrOptions); } /** * Find a published article by its ID or alias and its page * * @param mixed $varId The numeric ID or alias name * @param integer $intPid The page ID * @param array $arrOptions An optional options array * * @return ArticleModel|null The model or null if there is no article */ public static function findPublishedByIdOrAliasAndPid($varId, $intPid, array $arrOptions=array()) { $t = static::$strTable; $arrColumns = !preg_match('/^[1-9]\d*$/', $varId) ? array("BINARY $t.alias=?") : array("$t.id=?"); $arrValues = array($varId); if ($intPid) { $arrColumns[] = "$t.pid=?"; $arrValues[] = $intPid; } if (!static::isPreviewMode($arrOptions)) { $time = Date::floorToMinute(); $arrColumns[] = "$t.published='1' AND ($t.start='' OR $t.start<=$time) AND ($t.stop='' OR $t.stop>$time)"; } return static::findOneBy($arrColumns, $arrValues, $arrOptions); } /** * Find a published article by its ID * * @param integer $intId The article ID * @param array $arrOptions An optional options array * * @return ArticleModel|null The model or null if there is no published article */ public static function findPublishedById($intId, array $arrOptions=array()) { $t = static::$strTable; $arrColumns = array("$t.id=?"); if (!static::isPreviewMode($arrOptions)) { $time = Date::floorToMinute(); $arrColumns[] = "$t.published='1' AND ($t.start='' OR $t.start<=$time) AND ($t.stop='' OR $t.stop>$time)"; } return static::findOneBy($arrColumns, $intId, $arrOptions); } /** * Find all published articles by their parent ID and column * * @param integer $intPid The page ID * @param string $strColumn The column name * @param array $arrOptions An optional options array * * @return Collection|ArticleModel[]|ArticleModel|null A collection of models or null if there are no articles in the given column */ public static function findPublishedByPidAndColumn($intPid, $strColumn, array $arrOptions=array()) { $t = static::$strTable; $arrColumns = array("$t.pid=? AND $t.inColumn=?"); $arrValues = array($intPid, $strColumn); if (!static::isPreviewMode($arrOptions)) { $time = Date::floorToMinute(); $arrColumns[] = "$t.published='1' AND ($t.start='' OR $t.start<=$time) AND ($t.stop='' OR $t.stop>$time)"; } if (!isset($arrOptions['order'])) { $arrOptions['order'] = "$t.sorting"; } return static::findBy($arrColumns, $arrValues, $arrOptions); } /** * Find all published articles with teaser by their parent ID * * @param integer $intPid The page ID * @param array $arrOptions An optional options array * * @return Collection|ArticleModel[]|ArticleModel|null A collection of models or null if there are no articles in the given column */ public static function findPublishedWithTeaserByPid($intPid, array $arrOptions=array()) { $t = static::$strTable; $arrColumns = array("$t.pid=? AND $t.showTeaser=1"); if (!static::isPreviewMode($arrOptions)) { $time = Date::floorToMinute(); $arrColumns[] = "$t.published='1' AND ($t.start='' OR $t.start<=$time) AND ($t.stop='' OR $t.stop>$time)"; } if (!isset($arrOptions['order'])) { $arrOptions['order'] = "$t.sorting"; } return static::findBy($arrColumns, $intPid, $arrOptions); } /** * Find all published articles with teaser by their parent ID and column * * @param integer $intPid The page ID * @param string $strColumn The column name * @param array $arrOptions An optional options array * * @return Collection|ArticleModel[]|ArticleModel|null A collection of models or null if there are no articles in the given column */ public static function findPublishedWithTeaserByPidAndColumn($intPid, $strColumn, array $arrOptions=array()) { $t = static::$strTable; $arrColumns = array("$t.pid=? AND $t.inColumn=? AND $t.showTeaser=1"); $arrValues = array($intPid, $strColumn); if (!static::isPreviewMode($arrOptions)) { $time = Date::floorToMinute(); $arrColumns[] = "$t.published='1' AND ($t.start='' OR $t.start<=$time) AND ($t.stop='' OR $t.stop>$time)"; } if (!isset($arrOptions['order'])) { $arrOptions['order'] = "$t.sorting"; } return static::findBy($arrColumns, $arrValues, $arrOptions); } } class_alias(ArticleModel::class, 'ArticleModel'); An Error Occurred: Internal Server Error

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.