Beispiel #1
0
 * (at your option) any later version.
 *
 * CustomHtmlForms is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with CustomHtmlForms.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package CustomHtmlForm
 * @subpackage Config
 * @ignore
 */
ContentController::add_extension('CustomHtmlFormPage_Controller');
Security::add_extension('CustomHtmlFormPage_Controller');
SiteConfig::add_extension('CustomHtmlFormConfiguration');
$cacheBaseDir = getTempFolder() . DIRECTORY_SEPARATOR . 'cache';
$cacheDir = $cacheBaseDir . DIRECTORY_SEPARATOR . 'CustomHtmlForm';
if (Director::isDev()) {
    $cachelifetime = 1;
} else {
    $cachelifetime = 86400;
}
if (!is_dir($cacheDir)) {
    if (!is_dir($cacheBaseDir)) {
        mkdir($cacheBaseDir);
    }
    mkdir($cacheDir);
}
if (class_exists('SilvercartCleanCacheTask')) {
<?php

define('MOBILE_DIR', 'mobile');
SiteConfig::add_extension('MobileSiteConfigExtension');
ContentController::add_extension('MobileSiteControllerExtension');
Security::add_extension('MobileSiteControllerExtension');
SiteTree::add_extension('MobileSiteTreeExtension');
<?php

// Define path constant
$path = str_replace('\\', '/', __DIR__);
$path_fragments = explode('/', $path);
$dir_name = $path_fragments[count($path_fragments) - 1];
define('ABC_VENDOR_PATH', $dir_name . '/thirdparty');
define('ABC_PATH', $dir_name . '/src/abc');
// Configure Image Extension
AbcImageExtension::$fallback_image = ABC_PATH . '/images/no-image.jpg';
// attach Extensions
Image::add_extension('AbcImageExtension');
File::add_extension('AbcFileExtension');
LeftAndMain::add_extension('AbcLeftAndMainExtension');
SiteTree::add_extension('AbcSiteTreeExtension');
Security::add_extension('AbcSecurityExtension');
Controller::add_extension('AbcControllerExtension');
// DatePicker config
Object::useCustomClass('DateField_View_JQuery', 'jQueryUIDateField_View');