summaryrefslogtreecommitdiff
path: root/includes/display_stock_component_inc.php
blob: 2a93292feb9bdd1cf1e43fc6a3555a7b26a1388b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * @package stock
 * @subpackage functions
 */

use \Bitweaver\HttpStatusCodes;
use Bitweaver\KernelTools;

if( !$gContent->isValid() ) {
	$gBitSystem->fatalError( KernelTools::tra( "No component exists with the given ID" ) ,'error.tpl', '', HttpStatusCodes::HTTP_GONE );
}

$displayHash = [ 'perm_name' => 'p_stock_view' ];
$gContent->invokeServices( 'content_display_function', $displayHash );

$gBitSystem->setBrowserTitle( $gContent->getTitle() );
if( $gBitThemes->isAjaxRequest() ) {
	$gBitSmarty->display( $gContent->getRenderTemplate() );
} else {
	$gBitSystem->display( $gContent->getRenderTemplate() , null, [ 'display_mode' => 'display' ] );
}