PHP Class Eccube\Twig\Extension\EccubeExtension

Inheritance: extends Twig_Extension
Show file Open project: ec-cube/ec-cube

Public Methods

Method Description
__construct ( Silex\Application $app )
getActiveMenus ( array $menus = [] ) : array Name of this extension
getCalcIncTax ( $price, $tax_rate, $tax_rule ) : string Name of this extension
getCsrfTokenForAnchor ( ) : string Name of this extension
getDateFormatFilter ( $date, $value = '', $format = 'Y/m/d' ) : string Name of this extension
getEllipsis ( $value, $length = 100, $end = '...' ) : string Name of this extension
getFilters ( ) : array Returns a list of filters.
getFunctions ( ) : array Returns a list of functions to add to the existing list.
getName ( ) : string Name of this extension
getNoImageProduct ( $image ) : string return No Image filename
getPath ( string $name, array $parameters = [], boolean $relative = false ) : string bind から URL へ変換します。 \Symfony\Bridge\Twig\Extension\RoutingExtension::getPath の処理を拡張し、 RouteNotFoundException 発生時に E_USER_WARNING を発生させ、 文字列 "/404?bind={bind}" を返します。
getPriceFilter ( $number, $decimals, $decPoint = '.', $thousandsSep = ',' ) : string Name of this extension
getTimeAgo ( $date ) : string Name of this extension
getUrl ( string $name, array $parameters = [], boolean $schemeRelative = false ) : string bind から URL へ変換します。 \Symfony\Bridge\Twig\Extension\RoutingExtension::getUrl の処理を拡張し、 RouteNotFoundException 発生時に E_USER_WARNING を発生させ、 文字列 "/404?bind={bind}" を返します。

Method Details

__construct() public method

public __construct ( Silex\Application $app )
$app Silex\Application

getActiveMenus() public method

Name of this extension
public getActiveMenus ( array $menus = [] ) : array
$menus array
return array

getCalcIncTax() public method

Name of this extension
public getCalcIncTax ( $price, $tax_rate, $tax_rule ) : string
return string

getCsrfTokenForAnchor() public method

Name of this extension
public getCsrfTokenForAnchor ( ) : string
return string

getDateFormatFilter() public method

Name of this extension
public getDateFormatFilter ( $date, $value = '', $format = 'Y/m/d' ) : string
return string

getEllipsis() public method

Name of this extension
public getEllipsis ( $value, $length = 100, $end = '...' ) : string
return string

getFilters() public method

Returns a list of filters.
public getFilters ( ) : array
return array

getFunctions() public method

Returns a list of functions to add to the existing list.
public getFunctions ( ) : array
return array An array of functions

getName() public method

Name of this extension
public getName ( ) : string
return string

getNoImageProduct() public method

return No Image filename
public getNoImageProduct ( $image ) : string
return string

getPath() public method

bind から URL へ変換します。 \Symfony\Bridge\Twig\Extension\RoutingExtension::getPath の処理を拡張し、 RouteNotFoundException 発生時に E_USER_WARNING を発生させ、 文字列 "/404?bind={bind}" を返します。
public getPath ( string $name, array $parameters = [], boolean $relative = false ) : string
$name string
$parameters array
$relative boolean
return string URL

getPriceFilter() public method

Name of this extension
public getPriceFilter ( $number, $decimals, $decPoint = '.', $thousandsSep = ',' ) : string
return string

getTimeAgo() public method

Name of this extension
public getTimeAgo ( $date ) : string
return string

getUrl() public method

bind から URL へ変換します。 \Symfony\Bridge\Twig\Extension\RoutingExtension::getUrl の処理を拡張し、 RouteNotFoundException 発生時に E_USER_WARNING を発生させ、 文字列 "/404?bind={bind}" を返します。
public getUrl ( string $name, array $parameters = [], boolean $schemeRelative = false ) : string
$name string
$parameters array
$schemeRelative boolean
return string URL