Detailed Description
This class provides component visualisation routine.
- Author
- Dodonov A.A.
Definition at line 26 of file ad_banner_view.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 63 of file ad_banner_view.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
Function draws component.
- Parameters
-
- Returns
- HTML code of the компонента.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 232 of file ad_banner_view.php.
{
try
{
foreach( $Campaigns as $i => $c )
{
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'campaign.tpl' );
$Code = $this->String->print_record( $Code , $c );
$Code = str_replace( '{i}' , $i , $Code );
}
$CampaignListTemplate = $this->CachedMultyFS->get_template( __FILE__ , 'campaign_list.tpl' );
$this->Output = str_replace( '{output}' , $this->Output , $CampaignListTemplate );
}
catch( Exception $e )
{
}
}
| compile_banners_for_campaign |
( |
|
$CampaignId, |
|
|
|
$Code, |
|
|
|
$Banners |
|
) |
| |
Function compiles banners list.
- Parameters
-
| $CampaignId | - Campaign's id. |
| $Code | - Campaign's list. |
| $Banners | - Banners. |
- Returns
- HTML code of the компонента.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 186 of file ad_banner_view.php.
{
try
{
foreach( $Banners as $j => $b )
{
if( $CampaignId == $b->campaign_id )
{
$BannerTemplate = $this->CachedMultyFS->get_template( __FILE__ , 'banner.tpl' );
$BannerTemplate = $this->String->print_record( $BannerTemplate , $b );
$Code = str_replace(
'{banners}' , $BannerTemplate.'{banners}' , $Code
);
}
}
return( $Code );
}
catch( Exception $e )
{
}
}
| get_campaigns_and_banners |
( |
| ) |
|
Function returns campaigns and banners.
- Returns
- Campaigns and banners.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 132 of file ad_banner_view.php.
{
try
{
$Campaigns = $this->AdCampaignAccess->unsafe_select(
'archived = 0 AND creator = '.$this->UserAlgorithms->get_id()
);
if( count( $Campaigns ) == 0 )
{
$Campaigns = array( array( 'id' => -1 ) );
}
$Banners = $this->AdBannerAccess->unsafe_select(
'archived = 0 AND campaign_id IN ( '.
implode_ex(
',' , $Campaigns ,
'id' ).
' )'
);
return( array( $Campaigns , $Banners ) );
}
catch( Exception $e )
{
}
}
| pre_generation |
( |
|
$Options | ) |
|
Function executes before any page generating actions took place.
- Parameters
-
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 94 of file ad_banner_view.php.
{
try
{
$this->PageCSS->add_stylesheet(
'ad::ad_banner::ad_banner_view' , '1.0.0'
).'/res/css/ad_banner_view.css' ,
true
);
$Lang->include_strings_js( 'ad::ad_banner::ad_banner_view' );
}
catch( Exception $e )
{
}
}
Function draws component.
- Parameters
-
- Returns
- HTML code of the компонента.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 279 of file ad_banner_view.php.
{
try
{
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_ad_banner_view_common_view' );
$ContextSet->execute( $Options , $this , __FILE__ );
return( $this->Output );
}
catch( Exception $e )
{
}
}
Field Documentation
The documentation for this class was generated from the following file: