/**
	 * Log off method for the signon-based phpMyAdmin extension. Called as post processing
	 * hook in t3lib_userauth.php. Deletes the signon cookies
	 *
	 * @param	array		$params: Additional params passed to the method
	 * @param	object		$ref: The parent object (BE User Auth)
	 * @return	void
	 */
	function pmaLogOff($params = array(), $ref = null) {

			// Define the cookie path
		$cookiePath = substr(t3lib_extmgm::extPath('phpmyadmin'), strlen($_SERVER['DOCUMENT_ROOT'])).'res/'.$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['phpmyadmin']['pmaDirname'].'/';

			// Just ensure that the path is starting with a slash
		if (strpos($cookiePath, '/') !== 0) {
			$cookiePath = '/'.$cookiePath;
		}

		setcookie('tx_phpmyadmin', '', time() - 3600);
		setcookie('tx_phpmyadmin', '', time() - 3600, '/');
		setcookie('tx_phpmyadmin', '', time() - 3600, $cookiePath);
		setcookie('phpMyAdmin', '', time() - 3600);
		setcookie('phpMyAdmin', '', time() - 3600, '/');
		setcookie('phpMyAdmin', '', time() - 3600, $cookiePath);

			// Create signon session
		$session_name = 'tx_phpmyadmin';
		session_name($session_name);
		session_start();

			// Try to get the TYPO3 backend uri even if it's installed in a subdirectory
		$path_typo3 = substr(PATH_typo3, strlen($_SERVER['DOCUMENT_ROOT']), strlen(PATH_typo3));
		$path_typo3 = (substr($path_typo3, 0, 1) != '/'  ? '/'.$path_typo3 : $path_typo3);

		$_SESSION['PMA_LogoutURL'] = $path_typo3.'logout.php';
		$_SESSION['PMA_SignonURL'] = $path_typo3.'index.php';
		$_SESSION['PMA_LogoutURL'] = $path_typo3.'logout.php';

		// Close that session
		session_write_close();

	}
Exemplo n.º 2
0
 /**
  * Initializes the autoload mechanism of Extbase. This is supplement to the core autoloader.
  *
  * @return void
  * @see initialize()
  */
 protected function initializeClassLoader()
 {
     if (!class_exists('Tx_Extbase_Utility_ClassLoader', FALSE)) {
         require t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php';
     }
     $classLoader = new Tx_Extbase_Utility_ClassLoader();
     spl_autoload_register(array($classLoader, 'loadClass'));
 }
Exemplo n.º 3
0
 /**
  * Constructs a test case with the given name.
  *
  * @param  string $name
  * @param  array  $data
  * @param  string $dataName
  */
 public function __construct($name = NULL, array $data = array(), $dataName = '')
 {
     parent::__construct($name, $data, $dataName);
     if (!class_exists('Tx_Extbase_Utility_ClassLoader')) {
         require t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php';
     }
     spl_autoload_register(array('Tx_Extbase_Utility_ClassLoader', 'loadClass'));
 }
 public function userFunc()
 {
     if (!class_exists('Tx_Extbase_Utility_ClassLoader')) {
         require t3lib_extmgm::extPath('extbase') . 'Classes/Utility/ClassLoader.php';
     }
     $classLoader = new Tx_Extbase_Utility_ClassLoader();
     spl_autoload_register(array($classLoader, 'loadClass'));
     return $this->generateDocbook('Tx_Fluid_ViewHelpers');
 }
Exemplo n.º 5
0
 /**
  * @test
  */
 function mergeLocallangXmlWithXlf()
 {
     $this->markTestSkipped('The support for merging xml files with xlf is postponed.');
     $existingFile = t3lib_extmgm::extPath('extension_builder') . 'Tests/Examples/Tools/existing_locallang.xml';
     $newXlf = "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>\n\t\t\t<xliff version='1.0'>\n\t\t\t\t<file source-language='en' datatype='plaintext' original='messages' date='2012-03-47T19:00:47Z' product-name='test123'>\n\t\t\t\t\t<header/>\n\t\t\t\t\t<body>\n\t\t\t\t\t\t<trans-unit id='tx_test_index1'>\n\t\t\t\t\t\t\t<source>Label 1</source>\n\t\t\t\t\t\t</trans-unit>\n\t\t\t\t\t\t<trans-unit id='tx_test_index3'>\n\t\t\t\t\t\t\t<source>Additional label 3</source>\n\t\t\t\t\t\t</trans-unit>\n\t\t\t\t\t</body>\n\t\t\t\t</file>\n\t\t\t</xliff>";
     $result = Tx_ExtensionBuilder_Utility_Tools::mergeLocallangXml($existingFile, $newXlf, 'xlf');
     $expected = array('tx_test_index1' => 'Label 1 modified', 'tx_test_index3' => 'Additional label 3', 'tx_test_index2' => 'Label 2');
     $this->assertEquals($result, $expected);
 }
 /**
  * Parse a complex class from a file
  * @test
  */
 public function ParseAnotherComplexClass()
 {
     require_once t3lib_extmgm::extPath('extension_builder') . 'Tests/Examples/ClassParser/AnotherComplexClass.php';
     $classObject = $this->parseClass('Tx_ExtensionBuilder_Tests_Examples_ClassParser_AnotherComplexClass');
     /**  here we could include some more tests
     		$p = $classObject->getMethod('methodWithStrangePrecedingBlock')->getPrecedingBlock();
     		$a = $classObject->getAppendedBlock();
     		 */
 }
 function loadContentRepositoryFramework()
 {
     $sExtBasePath = t3lib_extmgm::extPath("extbase");
     require_once $sExtBasePath . "Classes/Utility/Strings.php";
     require_once $sExtBasePath . "Classes/Exception.php";
     require_once $sExtBasePath . "Classes/Persistence/Session.php";
     require_once $sExtBasePath . "Classes/Persistence/ObjectStorage.php";
     require_once $sExtBasePath . "Classes/Persistence/Mapper/DataMap.php";
     require_once $sExtBasePath . "Classes/Persistence/Mapper/ColumnMap.php";
     require_once $sExtBasePath . "Classes/Persistence/Mapper/ObjectRelationalMapper.php";
     require_once $sExtBasePath . "Classes/Persistence/RepositoryInterface.php";
     require_once $sExtBasePath . "Classes/Persistence/Repository.php";
     require_once $sExtBasePath . "Classes/DomainObject/DomainObjectInterface.php";
     require_once $sExtBasePath . "Classes/DomainObject/AbstractDomainObject.php";
 }
Exemplo n.º 8
0
 private function includeFluid()
 {
     # no autoinclude for the moment
     $this->sExtbasePath = t3lib_extmgm::extPath("extbase");
     $this->sFluidPath = t3lib_extmgm::extPath("fluid");
     require_once $this->sExtbasePath . "Classes/MVC/View/ViewInterface.php";
     require_once $this->sExtbasePath . "Classes/MVC/View/AbstractView.php";
     require_once $this->sExtbasePath . "Classes/MVC/View/Helper/URIHelper.php";
     require_once $this->sExtbasePath . "Classes/Reflection/DocCommentParser.php";
     require_once $this->sExtbasePath . "Classes/Reflection/ClassReflection.php";
     require_once $this->sExtbasePath . "Classes/Reflection/ParameterReflection.php";
     require_once $this->sExtbasePath . "Classes/Reflection/MethodReflection.php";
     require_once $this->sExtbasePath . "Classes/Reflection/Service.php";
     require_once $this->sFluidPath . "Classes/Fluid.php";
     require_once $this->sFluidPath . "Classes/Exception.php";
     require_once $this->sFluidPath . "Classes/Core/VariableContainer.php";
     require_once $this->sFluidPath . "Classes/Core/ParsedTemplateInterface.php";
     require_once $this->sFluidPath . "Classes/Core/ParsingState.php";
     require_once $this->sFluidPath . "Classes/Core/TemplateParser.php";
     require_once $this->sFluidPath . "Classes/Core/ArgumentDefinition.php";
     require_once $this->sFluidPath . "Classes/Core/ViewHelperInterface.php";
     require_once $this->sFluidPath . "Classes/Core/AbstractViewHelper.php";
     require_once $this->sFluidPath . "Classes/Core/ViewHelperArguments.php";
     require_once $this->sFluidPath . "Classes/Core/Exception.php";
     require_once $this->sFluidPath . "Classes/Core/RuntimeException.php";
     require_once $this->sFluidPath . "Classes/Core/ParsingException.php";
     require_once $this->sFluidPath . "Classes/Core/TagBasedViewHelper.php";
     require_once $this->sFluidPath . "Classes/Core/SyntaxTree/AbstractNode.php";
     require_once $this->sFluidPath . "Classes/Core/SyntaxTree/RootNode.php";
     require_once $this->sFluidPath . "Classes/Core/SyntaxTree/ViewHelperNode.php";
     require_once $this->sFluidPath . "Classes/Core/SyntaxTree/ObjectAccessorNode.php";
     require_once $this->sFluidPath . "Classes/Core/SyntaxTree/TextNode.php";
     require_once $this->sFluidPath . "Classes/Core/SyntaxTree/ArrayNode.php";
     require_once $this->sFluidPath . "Classes/Compatibility/ObjectFactory.php";
     require_once $this->sFluidPath . "Classes/Compatibility/TemplateParserBuilder.php";
     require_once $this->sFluidPath . "Classes/Compatibility/Validation/ValidatorResolver.php";
     require_once $this->sFluidPath . "Classes/Compatibility/Validation/DummyValidator.php";
     require_once $this->sFluidPath . "Classes/Compatibility/Validation/Errors.php";
     require_once $this->sFluidPath . "Classes/View/TemplateView.php";
     require_once $this->sFluidPath . "Classes/ViewHelpers/ForViewHelper.php";
     require_once $this->sFluidPath . "Classes/ViewHelpers/TypolinkViewHelper.php";
 }
Exemplo n.º 9
0
 /**
  * @test
  */
 function addMethodFromTemplateToNewClass()
 {
     $templateClassFileObject = $this->parser->parseFile(t3lib_extmgm::extPath('php_parser_api') . 'Resources/Private/Templates/MethodTemplates.php');
     $getPropertyMethod = $templateClassFileObject->getFirstClass()->getMethod('getPropertyName');
     $newClassFileObject = new Tx_PhpParser_Domain_Model_File();
     $newClassName = 'Tx_PhpParser_Test_NewClassWithTemplateMethod';
     $newClass = new Tx_PhpParser_Domain_Model_Class($newClassName);
     $newClass->addMethod($getPropertyMethod);
     $newClassFileObject->addClass($newClass);
     $newClassFilePath = $this->testDir . 'NewClassWithTemplateMethod.php';
     t3lib_div::writeFile($newClassFilePath, "<?php\n\n" . $this->printer->renderFileObject($newClassFileObject) . "\n?>");
     $this->assertTrue(file_exists($newClassFilePath));
     require_once $newClassFilePath;
     $this->assertTrue(class_exists($newClassName));
     $this->compareClasses($newClassFileObject, $newClassFilePath);
 }
 /**
  * [Describe function...]
  *
  * @param	[type]		$mInfos: ...
  * @return	[type]		...
  */
 function _getExtPath($mInfos)
 {
     if (!is_array($mInfos)) {
         // should be object type
         if (isset($this)) {
             $aInfos = $this->_getInfosRenderletForType($mInfos);
         } else {
             $aInfos = tx_ameosformidable::_getInfosForType($mInfos, $GLOBALS["TYPO3_CONF_VARS"]["EXTCONF"]["ameos_formidable"]["renderlets"]);
         }
     } else {
         $aInfos = $mInfos;
     }
     if ($aInfos["BASE"] === TRUE) {
         return PATH_formidable . "api/base/" . $aInfos["EXTKEY"] . "/";
     } else {
         return t3lib_extmgm::extPath($aInfos["EXTKEY"]);
     }
     return $extsrcpath;
 }
<?php

require_once t3lib_extmgm::extPath('fluid') . 'Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php';
/**
 * testing the features of the Condition_OneNotEmptyViewHelper
 * 
 * @author Christian Zenker <*****@*****.**>
 */
class Condition_OneNotEmptyViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase
{
    protected $viewHelper = null;
    protected $viewHelperVariableContainer = null;
    protected $viewHelperNode = null;
    public function setUp()
    {
        parent::setUp();
        $this->initViewHelper();
    }
    protected function initViewHelper()
    {
        $this->viewHelper = new Tx_CzSimpleCal_ViewHelpers_Condition_OneNotEmptyViewHelper();
    }
    public function testEmptyValues()
    {
        self::assertSame(false, $this->viewHelper->render(array()), 'nothing at all');
        self::assertSame(false, $this->viewHelper->render(array('')), 'empty string');
        self::assertSame(false, $this->viewHelper->render(array(0)), '0');
        self::assertSame(false, $this->viewHelper->render(array(false)), 'boolean false');
        self::assertSame(false, $this->viewHelper->render(array('0')), 'string with a 0');
        self::assertSame(false, $this->viewHelper->render(array(array())), 'empty array');
    }
Exemplo n.º 12
0
<?php

/*                                                                        *
 * This script is part of the TypoGento project 						  *
 *                                                                        *
 * TypoGento is free software; you can redistribute it and/or modify it   *
 * under the terms of the GNU General Public License version 2 as         *
 * published by the Free Software Foundation.                             *
 *                                                                        *
 * This script is distributed in the hope that it will be useful, but     *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
 * Public License for more details.                                       *
 *                                                                        */
require_once t3lib_extmgm::extPath('fb_magento') . 'lib/class.tx_fbmagento_tools.php';
/**
 * TypoGento Cache
 *
 * @version $Id: class.tx_fbmagento_interface.php 25 2009-01-21 16:43:16Z vinai $
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
 */
class tx_fbmagento_cache
{
    /**
     * Cache Handler
     *
     * @var ArrayObject
     */
    protected $_handler = null;
    /**
     * Singleton instance
Exemplo n.º 13
0
 *  free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  The GNU General Public License can be found at
 *  http://www.gnu.org/copyleft/gpl.html.
 *
 *  This script 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.
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/
require_once t3lib_extmgm::extPath('php_parser_api') . 'Tests/BaseTest.php';
class Tx_PhpParser_Tests_Unit_ParserTest extends Tx_PhpParser_Tests_BaseTest
{
    /**
     * @var Tx_PhpParser_Service_Parser
     */
    protected $parser;
    /**
     * @test
     */
    function parseSimpleProperty()
    {
        $classFileObject = $this->parseFile('SimpleProperty.php');
        $this->assertEquals(count($classFileObject->getClasses()), 1);
        $classObject = $classFileObject->getFirstClass();
        $this->assertEquals(count($classObject->getMethods()), 0);
Exemplo n.º 14
0
 /**
  * Returns the localized labels from an extension's language file.
  *
  * @param string $extensionName
  *        the extension name to get the localized labels from file for,
  *        must not be empty, the corresponding extension must be loaded
  *
  * @return string[] the localized labels from an extension's language file, will be empty if there are none
  */
 private function getLocalizedLabelsFromFile($extensionName)
 {
     if ($extensionName === '') {
         throw new InvalidArgumentException('The parameter $extensionName must not be empty.', 1331489618);
     }
     $languageFile = t3lib_extmgm::extPath($extensionName) . self::LANGUAGE_FILE_PATH;
     $localizedLabels = t3lib_div::readLLfile($languageFile, $this->languageKey, $this->renderCharset);
     if ($this->alternativeLanguageKey !== '') {
         $alternativeLocalizedLabels = t3lib_div::readLLfile($languageFile, $this->alternativeLanguageKey, $this->renderCharset);
         $localizedLabels = array_merge($alternativeLocalizedLabels, is_array($localizedLabels) ? $localizedLabels : array());
     }
     return $localizedLabels;
 }
<?php

require_once t3lib_extmgm::extPath('fluid') . 'Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php';
require_once t3lib_extmgm::extPath('cz_simple_cal') . 'Tests/Mocks/ViewHelpers/Format/TimespanToWordsViewHelper.php';
/**
 * testing the features of the Format_TimespanToWordsViewHelper
 * 
 * @author Christian Zenker <*****@*****.**>
 */
class Format_TimespanToWordsViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase
{
    protected $viewHelper = null;
    public function setUp()
    {
        parent::setUp();
        $this->viewHelper = new Tx_CzSimpleCalTests_Mock_ViewHelpers_Format_TimespanToWordsViewHelper();
    }
    public function testOnOneDay()
    {
        self::assertEquals('on February 13, 2009', $this->viewHelper->render(new Tx_CzSimpleCal_Utility_DateTime('2009-02-13'), new Tx_CzSimpleCal_Utility_DateTime('2009-02-13')));
    }
    public function testOnOneMonth()
    {
        self::assertEquals('from February 13 to 15, 2009', $this->viewHelper->render(new Tx_CzSimpleCal_Utility_DateTime('2009-02-13'), new Tx_CzSimpleCal_Utility_DateTime('2009-02-15')));
    }
    public function testOnOneYear()
    {
        self::assertEquals('from February 13 to March 15, 2009', $this->viewHelper->render(new Tx_CzSimpleCal_Utility_DateTime('2009-02-13'), new Tx_CzSimpleCal_Utility_DateTime('2009-03-15')));
    }
    public function testElse()
    {
Exemplo n.º 16
0
 /**
  * Retrieves path and filename of the not-found-template
  *
  * @return string path and filename of the not-found-template
  * @author Bastian Waidelich <*****@*****.**>
  */
 protected function getTemplatePathAndFilename()
 {
     return t3lib_extmgm::extPath('extbase') . 'Resources/Private/MVC/NotFoundView_Template.html';
 }
Exemplo n.º 17
0
    private $arrayProperty2 = array('test' => 3, 'b' => 'q');
    static $constProperty = testConstant;
    /**
     * @static
     * @param $param1
     * @param $param2
     * @param string $param3
     * @param array $param4
     * @return int
     */
    static function methodWithVariousParameter($param1, &$param2, $param3 = 'default', array $param4 = array('test' => array(1, 2, 3)))
    {
        /**
         * test test
         */
        $test = 234;
        return 5;
        // test test
    }
    const another_Constant = "r5r_8";
    // single line comment
    var $testProperty4 = 123;
}
/**
 *  dfg dfg dfg dfg
 */
require_once t3lib_extmgm::extPath('extension_builder') . 'Tests/Examples/ClassParser/BasicClass.php';
include_once t3lib_extmgm::extPath('extension_builder') . 'Tests/Examples/ComplexClass.php';
// test
include_once t3lib_extmgm::extPath('extension_builder') . 'Tests/Examples/ClassParser/ComplexClass.php';
// test
Exemplo n.º 18
0
// DEFAULT initialization of a module [BEGIN]
unset($MCONF);
require 'conf.php';
require $BACK_PATH . 'init.php';
require $BACK_PATH . 'template.php';
$LANG->includeLLFile('EXT:dam_catedit/mod1/locallang.xml');
$BE_USER->modAccess($MCONF, 1);
// This checks permissions and exits if the users has no permission for entry.
// DEFAULT initialization of a module [END]
require_once PATH_t3lib . 'class.t3lib_scbase.php';
require_once PATH_txdam . 'lib/class.tx_dam_scbase.php';
$LANG->includeLLFile('EXT:lang/locallang_mod_web_list.xml');
#require_once(t3lib_extmgm::extPath('dam_catedit').'class.tx_dam_db_list.php');
require_once t3lib_extmgm::extPath('dam_catedit') . 'class.tx_dam_db_list2.php';
require_once PATH_txdam . 'lib/class.tx_dam_sysfolder.php';
require_once t3lib_extmgm::extPath('dam_catedit') . 'lib/class.tx_damcatedit_db.php';
require_once PATH_txdam . 'lib/class.tx_dam_browsetrees.php';
class tx_damcatedit_module1 extends tx_dam_SCbase
{
    public $moduleContent;
    /**
     * Main function of the module. Write the content to $this->content
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA, $TYPO3_CONF_VARS;
        $this->defaultPid = tx_dam_db::getPid();
        $this->id = $this->id ? $this->id : $this->defaultPid;
        // Access check!
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
Exemplo n.º 19
0
 protected function parseFile($fileName)
 {
     $classFilePath = t3lib_extmgm::extPath('php_parser_api') . 'Tests/Fixtures/' . $fileName;
     $classFileObject = $this->parser->parseFile($classFilePath);
     return $classFileObject;
 }
Exemplo n.º 20
0
 protected function parseAndWrite($fileName, $subFolder = '')
 {
     $classFilePath = t3lib_extmgm::extPath('php_parser_api') . 'Tests/Fixtures/' . $subFolder . $fileName;
     $this->assertTrue(file_exists($classFilePath));
     $classFileObject = $this->parser->parseFile($classFilePath);
     $newClassFilePath = $this->testDir . $fileName;
     t3lib_div::writeFile($newClassFilePath, "<?php\n\n" . $this->printer->renderFileObject($classFileObject) . "\n?>");
     return $classFileObject;
 }
 /**
  * Init Function: here all the needed configuration values are stored in class variables..
  *
  * @param	array		$conf : configuration array from TS
  * @return	void
  */
 function init($conf)
 {
     $this->conf = $conf;
     $this->pi_setPiVarDefaults();
     $this->pi_loadLL();
     $this->pi_USER_INT_obj = 1;
     // Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!
     //Get Eventcontainer-PID -- Set actual page if no container is specified
     $this->eventFolder = explode(',', $this->cObj->data['pages']);
     // if there is no startingpoint, use the current page as eventfolder:
     if (!intval($this->eventFolder[0])) {
         $this->eventFolder[0] = $GLOBALS['TSFE']->id;
     }
     $this->eventFolderSQLPart = ' AND (ev.pid=' . $this->eventFolder[0] . '';
     if (count($this->eventFolder > 1)) {
         for ($i = 1; $i < count($this->eventFolder); $i++) {
             $this->eventFolderSQLPart .= ' OR ev.pid=' . $this->eventFolder[$i] . '';
         }
     }
     $this->eventFolderSQLPart .= ')';
     // startingpointRecursiveLevel:
     $this->startingpointRecursiveLevel = $this->cObj->data['recursive'];
     // Path to extension:
     $this->extPath = t3lib_extmgm::extPath($this->extKey);
     $this->extRelPath = t3lib_extmgm::siteRelPath($this->extKey);
     //Set Vars
     $content = "";
     $this->img_pfad = 'uploads/tx_kbeventboard/';
     $this->yesterday = mktime(0, 0, 0, date("m"), date("d") - 1, date("Y"));
     $this->today = time();
     $this->aktUserGroup = $GLOBALS['TSFE']->fe_user->groupData[uid];
     if (empty($this->aktUserGroup)) {
         $this->aktUserGroup = array(0 => '0');
     }
     $this->spanindex = 0;
     // get data from Flexform:
     $this->pi_initPIflexForm();
     // loading template:
     $templateflex_file = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'template_file', 's_template');
     if ($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'template_file', 's_template') != "" && strchr($templateflex_file, 'fileadmin')) {
         $templateflex_file = explode("fileadmin", $templateflex_file);
         $templateflex_file = "fileadmin" . $templateflex_file[1];
     } else {
         $templateflex_file = 'EXT:kb_eventboard/template.tmpl';
     }
     $this->tmpl = $this->cObj->fileResource($templateflex_file);
     // some vars:
     $this->sel_categories = array_unique(explode(',', $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'sel_categories', 's_template')));
     $this->step = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'step', 's_template') ? $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'step', 's_template') : $this->conf["step"];
     $this->csseven = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'csseven', 's_template');
     $this->cssodd = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'cssodd', 's_template');
     $this->showmode = $this->piVars['showmode'] ? $this->piVars['showmode'] : $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showmode', 's_template');
     $this->showLocation = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'show_location', 's_template');
     $this->allevents = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'allevents', 's_template');
     $this->showMorelink = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'show_morelink', 's_template');
     $this->showTitleLink = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showTitleLink', 's_template');
     $this->morelinkId = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'morelink', 's_template');
     $this->eventid = $this->piVars['evt'] ? $this->piVars['evt'] : t3lib_div::_GET('evt');
     $this->eventid = intval($this->eventid);
     $this->ascDesc = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'ascDesc', 's_template') ? ' DESC' : ' ASC';
     $this->include_css = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'include_css', 's_template');
     $this->showImages = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showImages', 's_template');
     $this->showAllImages = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'showAllImages', 's_template');
 }
<?php

require_once t3lib_extmgm::extPath('fluid') . 'Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php';
require_once t3lib_extmgm::extPath('cz_simple_cal') . 'Classes/ViewHelpers/Calendar/OnNewDayViewHelper.php';
/**
 * testing the features of the Calendar_OnNewDayViewHelper
 * 
 * @author Christian Zenker <*****@*****.**>
 */
class Calendar_OnNewDayViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase
{
    protected $viewHelper = null;
    protected $viewHelperVariableContainer = null;
    public function setUp()
    {
        parent::setUp();
        $this->initViewHelper();
    }
    protected function initViewHelper()
    {
        $this->viewHelper = new Tx_CzSimpleCalTests_Mocks_ViewHelpers_Calendar_OnNewDayViewHelper();
        $this->viewHelperVariableContainer = new Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer();
        $this->viewHelper->setViewHelperVariableContainer($this->viewHelperVariableContainer);
    }
    public function testIfContentIsRenderedIfNoViewHelperWasPreviouslyUsed()
    {
        $model = new Tx_CzSimpleCal_Domain_Model_EventIndex();
        $model->setStart(1234567890);
        $model->setEnd(1234567890);
        self::assertSame('tag content', $this->viewHelper->render($model));
    }
<?php

/*                                                                        *
 * This script is part of the TypoGento project 						  *
 *                                                                        *
 * TypoGento is free software; you can redistribute it and/or modify it   *
 * under the terms of the GNU General Public License version 2 as         *
 * published by the Free Software Foundation.                             *
 *                                                                        *
 * This script is distributed in the hope that it will be useful, but     *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
 * Public License for more details.                                       *
 *                                                                        */
require_once t3lib_extmgm::extPath('fb_magento') . 'lib/class.tx_fbmagento_tools.php';
require_once t3lib_extmgm::extPath('fb_magento') . 'lib/class.tx_fbmagento_interface.php';
#
/**
 * TypoGento hookobserver
 *
 * @version $Id: class.tx_fbmagento_interface.php 25 2009-01-21 16:43:16Z vinai $
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
 */
class tx_fbmagento_hookobserver
{
    /**
     * logoff Hook
     * 
     * @param array $params
     * @param t3lib_userAuth $pObj
     */
Exemplo n.º 24
0
t3lib_div::loadTCA("fe_users");
t3lib_extMgm::addTCAcolumns("fe_users", $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes("fe_users", "firstname;;;;1-1-1");
t3lib_extMgm::addToAllTCAtypes("fe_users", "tx_fbmagento_id;;;;1-1-1");
// add store mapping
$tempColumns = array("tx_fbmagento_store" => array("exclude" => 0, "label" => "LLL:EXT:fb_magento/locallang_db.xml:sys_language.tx_fbmagento_store", "config" => array("type" => "select", "itemsProcFunc" => "EXT:fb_magento/lib/class.tx_fbmagento_tcafields.php:tx_fbmagento_tcafields->itemsProcFunc_languages", "maxitems" => 1)));
t3lib_div::loadTCA("sys_language");
t3lib_extMgm::addTCAcolumns("sys_language", $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes("sys_language", "tx_fbmagento_store;;;;1-1-1");
// add group mapping
$tempColumns = array("tx_fbmagento_group" => array("exclude" => 0, "label" => "LLL:EXT:fb_magento/locallang_db.xml:be_users.tx_fbmagento_group", "config" => array("type" => "select", "items" => array(array('LLL:EXT:fb_magento/locallang_db.xml:be_users.tx_fbmagento_group.0', '')), "itemsProcFunc" => "EXT:fb_magento/lib/class.tx_fbmagento_tcafields.php:tx_fbmagento_tcafields->itemsProcFunc_usergroups", "maxitems" => 1)));
t3lib_div::loadTCA("be_users");
t3lib_extMgm::addTCAcolumns("be_users", $tempColumns, 1);
t3lib_extMgm::addToAllTCAtypes("be_users", "tx_fbmagento_group;;;;1-1-1");
if (TYPO3_MODE == "BE") {
    // add module after 'Web'
    if (!isset($TBE_MODULES['txfbmagentoMgroup'])) {
        $temp_TBE_MODULES = array();
        foreach ($TBE_MODULES as $key => $val) {
            $temp_TBE_MODULES[$key] = $val;
            if ($key == 'web') {
                $temp_TBE_MODULES['txfbmagentoMgroup'] = $val;
            }
        }
        $TBE_MODULES = $temp_TBE_MODULES;
    }
    // add group module
    t3lib_extMgm::addModule('txfbmagentoMgroup', '', '', t3lib_extmgm::extPath($_EXTKEY) . 'mod_group/');
    // add admin module
    t3lib_extMgm::addModule('txfbmagentoMgroup', 'txfbmagentoMadmin', '', t3lib_extmgm::extPath($_EXTKEY) . 'mod_admin/');
}