PHP Class Contao\ArticleModel

Inheritance: extends Model
显示文件 Open project: contao/core-bundle Class Usage Examples

Protected Properties

Property Type Description
$strTable string Table name

Public Methods

Method Description
findByIdOrAliasAndPid ( mixed $varId, integer $intPid, array $arrOptions = [] ) : ArticleModel | null Find an article by its ID or alias and its page
findPublishedById ( integer $intId, array $arrOptions = [] ) : ArticleModel | null Find a published article by its ID
findPublishedByIdOrAliasAndPid ( mixed $varId, integer $intPid, array $arrOptions = [] ) : ArticleModel | null Find a published article by its ID or alias and its page
findPublishedByPidAndColumn ( integer $intPid, string $strColumn, array $arrOptions = [] ) : Collection | ArticleModel[] | ArticleModel | null Find all published articles by their parent ID and column
findPublishedWithTeaserByPid ( integer $intPid, array $arrOptions = [] ) : Collection | ArticleModel[] | ArticleModel | null Find all published articles with teaser by their parent ID
findPublishedWithTeaserByPidAndColumn ( integer $intPid, string $strColumn, array $arrOptions = [] ) : Collection | ArticleModel[] | ArticleModel | null Find all published articles with teaser by their parent ID and column

Method Details

findByIdOrAliasAndPid() public static method

Find an article by its ID or alias and its page
public static findByIdOrAliasAndPid ( mixed $varId, integer $intPid, array $arrOptions = [] ) : ArticleModel | null
$varId mixed The numeric ID or alias name
$intPid integer The page ID
$arrOptions array An optional options array
return ArticleModel | null The model or null if there is no article

findPublishedById() public static method

Find a published article by its ID
public static findPublishedById ( integer $intId, array $arrOptions = [] ) : ArticleModel | null
$intId integer The article ID
$arrOptions array An optional options array
return ArticleModel | null The model or null if there is no published article

findPublishedByIdOrAliasAndPid() public static method

Find a published article by its ID or alias and its page
public static findPublishedByIdOrAliasAndPid ( mixed $varId, integer $intPid, array $arrOptions = [] ) : ArticleModel | null
$varId mixed The numeric ID or alias name
$intPid integer The page ID
$arrOptions array An optional options array
return ArticleModel | null The model or null if there is no article

findPublishedByPidAndColumn() public static method

Find all published articles by their parent ID and column
public static findPublishedByPidAndColumn ( integer $intPid, string $strColumn, array $arrOptions = [] ) : Collection | ArticleModel[] | ArticleModel | null
$intPid integer The page ID
$strColumn string The column name
$arrOptions array An optional options array
return Contao\Model\Collection | ArticleModel[] | ArticleModel | null A collection of models or null if there are no articles in the given column

findPublishedWithTeaserByPid() public static method

Find all published articles with teaser by their parent ID
public static findPublishedWithTeaserByPid ( integer $intPid, array $arrOptions = [] ) : Collection | ArticleModel[] | ArticleModel | null
$intPid integer The page ID
$arrOptions array An optional options array
return Contao\Model\Collection | ArticleModel[] | ArticleModel | null A collection of models or null if there are no articles in the given column

findPublishedWithTeaserByPidAndColumn() public static method

Find all published articles with teaser by their parent ID and column
public static findPublishedWithTeaserByPidAndColumn ( integer $intPid, string $strColumn, array $arrOptions = [] ) : Collection | ArticleModel[] | ArticleModel | null
$intPid integer The page ID
$strColumn string The column name
$arrOptions array An optional options array
return Contao\Model\Collection | ArticleModel[] | ArticleModel | null A collection of models or null if there are no articles in the given column

Property Details

$strTable protected_oe static_oe property

Table name
protected static string $strTable
return string