2013-02-08 15:42:48 +01:00
|
|
|
<?php
|
2016-09-09 09:00:05 +02:00
|
|
|
|
2016-12-19 04:26:29 +01:00
|
|
|
namespace SilverStripe\GridFieldExtensions;
|
2016-11-29 18:20:15 +01:00
|
|
|
|
2016-09-09 09:00:05 +02:00
|
|
|
use SilverStripe\View\Requirements;
|
|
|
|
|
2013-02-08 15:42:48 +01:00
|
|
|
/**
|
|
|
|
* Utility functions for the grid fields extension module.
|
|
|
|
*/
|
2016-12-21 03:34:58 +01:00
|
|
|
class GridFieldExtensions
|
|
|
|
{
|
2013-02-08 15:42:48 +01:00
|
|
|
|
2016-12-21 03:34:58 +01:00
|
|
|
public static function include_requirements()
|
|
|
|
{
|
|
|
|
$moduleDir = self::get_module_dir();
|
|
|
|
Requirements::css($moduleDir.'/css/GridFieldExtensions.css');
|
|
|
|
Requirements::javascript($moduleDir.'/javascript/GridFieldExtensions.js');
|
|
|
|
}
|
2013-02-08 15:42:48 +01:00
|
|
|
|
2016-12-21 03:34:58 +01:00
|
|
|
public static function get_module_dir()
|
|
|
|
{
|
|
|
|
return basename(dirname(__DIR__));
|
|
|
|
}
|
2013-02-08 15:42:48 +01:00
|
|
|
}
|