Commit ebe851ac authored by Andy Hausmann's avatar Andy Hausmann

Initial upload

parents
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Andy Hausmann <andy@milkmonkey.de>, Milkmonkey GmbH
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* 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 3 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!
***************************************************************/
/**
*
*
* @package flexslider
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class Tx_FlexSlider_Controller_FlexSliderController extends Tx_Extbase_MVC_Controller_ActionController {
/**
* @var tslib_cObj
*/
protected $contentObject;
/**
* flexSliderRepository
*
* @var Tx_FlexSlider_Domain_Repository_FlexSliderRepository
*/
protected $flexSliderRepository;
/**
* injectFlexSliderRepository
*
* @param Tx_FlexSlider_Domain_Repository_FlexSliderRepository $flexSliderRepository
* @return void
*/
public function injectFlexSliderRepository(Tx_FlexSlider_Domain_Repository_FlexSliderRepository $flexSliderRepository) {
$this->flexSliderRepository = $flexSliderRepository;
}
/**
* Kinda constructor
* Beeing executed right after __construct and has access to injected Objects
*
* @return void
*/
public function initializeAction()
{
$this->contentObject = $this->configurationManager->getContentObject();
}
/**
* action list
*
* @return void
*/
public function listAction() {
$flexSliders = $this->flexSliderRepository->findAll();
$this->view->assign('flexSliders', $flexSliders);
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Andy Hausmann <andy@milkmonkey.de>, Milkmonkey GmbH
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* 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 3 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!
***************************************************************/
/**
*
*
* @package flexslider
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class Tx_FlexSlider_Domain_Model_FlexSlider extends Tx_Extbase_DomainObject_AbstractEntity {
/**
* name
*
* @var string
*/
protected $name;
/**
* title
*
* @var string
*/
protected $title;
/**
* subtitle
*
* @var string
*/
protected $subtitle;
/**
* image
*
* @var string
* @validate NotEmpty
*/
protected $image;
/**
* link
*
* @var string
*/
protected $link;
/**
* caption
*
* @var string
*/
protected $caption;
/**
* Returns the name
*
* @return string $name
*/
public function getName() {
return $this->name;
}
/**
* Sets the name
*
* @param string $name
* @return void
*/
public function setName($name) {
$this->name = $name;
}
/**
* Returns the title
*
* @return string $title
*/
public function getTitle() {
return $this->title;
}
/**
* Sets the title
*
* @param string $title
* @return void
*/
public function setTitle($title) {
$this->title = $title;
}
/**
* Returns the subtitle
*
* @return string $subtitle
*/
public function getSubtitle() {
return $this->subtitle;
}
/**
* Sets the subtitle
*
* @param string $subtitle
* @return void
*/
public function setSubtitle($subtitle) {
$this->subtitle = $subtitle;
}
/**
* Returns the image
*
* @return string $image
*/
public function getImage() {
return $this->image;
}
/**
* Sets the image
*
* @param string $image
* @return void
*/
public function setImage($image) {
$this->image = $image;
}
/**
* Returns the link
*
* @return string $link
*/
public function getLink() {
return $this->link;
}
/**
* Sets the link
*
* @param string $link
* @return void
*/
public function setlink($link) {
$this->link = $link;
}
/**
* Returns the caption
*
* @return string $caption
*/
public function getCaption() {
return $this->caption;
}
/**
* Sets the caption
*
* @param string $caption
* @return void
*/
public function setCaption($caption) {
$this->caption = $caption;
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Andy Hausmann <andy@milkmonkey.de>, Milkmonkey GmbH
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* 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 3 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!
***************************************************************/
/**
*
*
* @package flexslider
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class Tx_FlexSlider_Domain_Repository_FlexSliderRepository extends Tx_Extbase_Persistence_Repository {
}
?>
\ No newline at end of file
#
# Extension Builder settings for extension flexslider
# generated 2012-04-15
#
# See http://www.yaml.org/spec/1.2/spec.html
#
---
########### Overwrite settings ###########
#
# These settings only apply, if the roundtrip feature of the extension builder
# is enabled in the extension manager
#
# Usage:
# nesting reflects the file structure
# a setting applies to a file or recursive to all files and subfolders
#
# merge:
# means for classes: All properties ,methods and method bodies
# of the existing class will be modified according to the new settings
# but not overwritten
#
# for locallang xml files: Existing keys and labels are always
# preserved (renaming in the GUI has only influence on the property and method names)
#
# for other files: You will find a Split token at the end of the file
# After this token you can write whatever you want and it will be appended
# everytime the code is generated
#
# keep:
# files are never overwritten
# These settings may break the functionality of the extension builder!
# Handle with care!
#
#
############ extension settings ##############
emConf:
dependencies: cms,extbase,fluid
overwriteSettings:
Classes:
Controller: merge
Domain:
Model: merge
Repository: merge
Configuration:
#TCA: merge
#TypoScript: keep
Resources:
Private:
Language:
#locallang.xml: merge
#Templates: keep
ext_icon.gif: keep
# ext_localconf.php: merge
# ext_tables.php: merge
# ext_tables.sql: merge
## ext_autoload.php is only needed in special cases ##
createAutoloadRegistry: false
######### settings for classBuilder #############################
#
# here you may define default parent classes for your classes
# these settings only apply for new generated classes
# you may also just change the parent class in the generated class file.
# It will be kept on next code generation, if the overwrite settings
# are configured to merge it
#
# Experimental!!
#################################################################
classBuilder:
Controller:
parentClass: Tx_Extbase_MVC_Controller_ActionController
Model:
AbstractEntity:
parentClass: Tx_Extbase_DomainObject_AbstractEntity
AbstractValueObject:
parentClass: Tx_Extbase_DomainObject_AbstractValueObject
Repository:
parentClass: Tx_Extbase_Persistence_Repository
\ No newline at end of file
<T3DataStructure>
<meta type="array">
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:flexslider/Resources/Private/Language/locallang_be.xml:flexforms_tab.settings
</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.autoPlay>
<TCEforms>
<label>
LLL:EXT:flexslider/Resources/Private/Language/locallang_be.xml:flexforms_settings.autoPlay
</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.autoPlay>
<settings.slideSpeed>
<TCEforms>
<label>
LLL:EXT:flexslider/Resources/Private/Language/locallang_be.xml:flexforms_settings.slideSpeed
</label>
<config>
<type>input</type>
<size>30</size>
</config>
</TCEforms>
</settings.slideSpeed>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
\ No newline at end of file
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
$TCA['tx_flexslider_domain_model_flexslider'] = array(
'ctrl' => $TCA['tx_flexslider_domain_model_flexslider']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, title, subtitle, image, link, caption',
),
'types' => array(
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, title, subtitle, image, link, caption,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
),
'palettes' => array(
'1' => array('showitem' => ''),
),
'columns' => array(
'sys_language_uid' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
'config' => array(
'type' => 'select',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => array(
array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
),
),
),
'l10n_parent' => array(
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
'config' => array(
'type' => 'select',
'items' => array(
array('', 0),
),
'foreign_table' => 'tx_flexslider_domain_model_flexslider',
'foreign_table_where' => 'AND tx_flexslider_domain_model_flexslider.pid=###CURRENT_PID### AND tx_flexslider_domain_model_flexslider.sys_language_uid IN (-1,0)',
),
),
'l10n_diffsource' => array(
'config' => array(
'type' => 'passthrough',
),
),
't3ver_label' => array(
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
'config' => array(
'type' => 'input',
'size' => 30,
'max' => 255,
)
),
'hidden' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
'config' => array(
'type' => 'check',
),
),
'starttime' => array(
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
'config' => array(
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => array(
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
),
),
),
'endtime' => array(
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
'config' => array(
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => array(
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
),
),
),
'name' => array(
'exclude' => 0,
'label' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider.name',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'title' => array(
'exclude' => 0,
'label' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider.title',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'subtitle' => array(
'exclude' => 0,
'label' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider.subtitle',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'image' => array(
'exclude' => 0,
'label' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider.image',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'uploadfolder' => 'uploads/tx_mmflexslider',
'show_thumbs' => 1,
'size' => 5,
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'disallowed' => '',
),
),
'link' => array(
'exclude' => 0,
'label' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider.link',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'caption' => array(
'exclude' => 0,
'label' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider.caption',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
),
);
?>
\ No newline at end of file
plugin.tx_mmflexslider {
view {
# cat=plugin.tx_mmflexslider/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:flexslider/Resources/Private/Templates/
# cat=plugin.tx_mmflexslider/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:flexslider/Resources/Private/Partials/
# cat=plugin.tx_mmflexslider/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:flexslider/Resources/Private/Layouts/
}
persistence {
# cat=plugin.tx_mmflexslider//a; type=int+; label=Default storage PID
storagePid =
}
}
\ No newline at end of file
plugin.tx_mmflexslider {
view {
templateRootPath = {$plugin.tx_mmflexslider.view.templateRootPath}
partialRootPath = {$plugin.tx_mmflexslider.view.partialRootPath}
layoutRootPath = {$plugin.tx_mmflexslider.view.layoutRootPath}
}
persistence {
storagePid = {$plugin.tx_mmflexslider.persistence.storagePid}
}
}
plugin.tx_mmflexslider._CSS_DEFAULT_STYLE (
input.f3-form-error {
background-color:#FF9F9F;
border: 1px #FF0000 solid;
}
.tx-mm-flexslider table {
border-collapse:separate;
border-spacing:10px;
}
.tx-mm-flexslider table th {
font-weight:bold;
}
.tx-mm-flexslider table td {
vertical-align:top;
}
)
\ No newline at end of file
{"modules":[{"config":{"position":[157,109]},"name":"New Model Object","value":{"actionGroup":{"_default0_list":true,"_default1_show":false,"_default2_new_create":false,"_default3_edit_update":false,"_default4_delete":false,"customActions":[]},"name":"FlexSlider","objectsettings":{"aggregateRoot":true,"description":"","mapToTable":"","parentClass":"","type":"Entity","uid":"642128317405"},"propertyGroup":{"properties":[{"propertyDescription":"","propertyIsExcludeField":false,"propertyIsRequired":false,"propertyName":"title","propertyType":"String","uid":"896014197197"},{"propertyDescription":"","propertyIsExcludeField":false,"propertyIsRequired":false,"propertyName":"subtitle","propertyType":"String","uid":"951185801447"},{"propertyDescription":"","propertyIsExcludeField":false,"propertyIsRequired":true,"propertyName":"image","propertyType":"Image","uid":"235884769220"},{"propertyDescription":"","propertyIsExcludeField":false,"propertyIsRequired":false,"propertyName":"caption","propertyType":"String","uid":"251010463488"}]},"relationGroup":{"relations":[]}}}],"properties":{"backendModules":[],"description":"","emConf":{"category":"plugin","custom_category":"","dependsOn":"extbase => 1.3.0\nfluid => 1.3.0","disableVersioning":false,"priority":"","shy":false,"state":"alpha","version":"1.00"},"extensionKey":"flexslider","name":"flexSlider","originalExtensionKey":"mm_flexible","persons":[{"company":"Milkmonkey GmbH","email":"andy@milkmonkey.de","name":"Andy Hausmann","role":"Developer"}],"plugins":[{"actions":{"controllerActionCombinations":"","noncacheableActions":"","switchableActions":""},"key":"flexslider","name":"flexSlider"}]},"wires":[],"log":{"last_modified":"2012-04-15 12:02","extension_builder_version":"2.2.0","be_user":"Andy Hausmann (5)"}}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for the flexSlider extension in the FRONTEND</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="tx_flexslider_domain_model_flexslider">FlexSlider</label>
<label index="tx_flexslider_domain_model_flexslider.name">name</label>
<label index="tx_flexslider_domain_model_flexslider.title">title</label>
<label index="tx_flexslider_domain_model_flexslider.subtitle">subtitle</label>
<label index="tx_flexslider_domain_model_flexslider.image">image</label>
<label index="tx_flexslider_domain_model_flexslider.link">link</label>
<label index="tx_flexslider_domain_model_flexslider.caption">caption</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for the flexslider extension in the BACKEND</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="pi1_title">FlexSlider</label>
<label index="pi1_plus_wiz_description">The popular FlexSlider</label>
<!-- Flexforms -->
<label index="flexforms_tab.settings">Settings</label>
<label index="flexforms_settings.autoPlay">Auto Play</label>
<label index="flexforms_settings.slideSpeed">Slideshow Speed (in ms)</label>
</languageKey>
<languageKey index="de" type="array">
<label index="pi1_title">FlexSlider</label>
<label index="pi1_plus_wiz_description">Der berühmte FlexSlider</label>
<!-- Flexforms -->
<label index="flexforms_tab.settings">Einstellungen</label>
<label index="flexforms_settings.autoPlay">Automatisches Abspielen</label>
<label index="flexforms_settings.slideSpeed">Slideshow-Geschwindigkeit (in ms)</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<description>Context Sensitive Help (CSH) for table tx_flexslider_domain_model_flexslider</description>
<type>CSH</type>
<csh_table>tx_flexslider_domain_model_flexslider</csh_table>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="title.description">title</label>
<label index="subtitle.description">subtitle</label>
<label index="image.description">image</label>
<label index="caption.description">caption</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>database</type>
<description>Language labels for database tables/fields belonging to extension 'flexslider'</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="tx_flexslider_domain_model_flexslider">Flex Slider</label>
<label index="tx_flexslider_domain_model_flexslider.name">Name</label>
<label index="tx_flexslider_domain_model_flexslider.title">Title</label>
<label index="tx_flexslider_domain_model_flexslider.subtitle">Subtitle</label>
<label index="tx_flexslider_domain_model_flexslider.image">Image</label>
<label index="tx_flexslider_domain_model_flexslider.link">Link</label>
<label index="tx_flexslider_domain_model_flexslider.caption">Caption</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
<div class="tx-mm-flexslider">
<f:render section="main" />
</div>
\ No newline at end of file
<f:layout name="Default" />
<f:section name="main">
<f:flashMessages />
<script type="text/javascript">
$(window).load(function() {
$('.flexslider').flexslider({
slideshow: <f:if condition="{settings.autoPlay} > 0"><f:then>true</f:then><f:else>false</f:else></f:if>,
slideshowSpeed: <f:if condition="{settings.slideSpeed} > 0"><f:then>{settings.slideSpeed}</f:then><f:else>7000</f:else></f:if>
});
});
</script>
<f:if condition="<f:count subject='{flexSliders}' /> > 0">
<div class="flexslider">
<ul class="slides">
<f:for each="{flexSliders}" as="flexSlider">
<li>
<f:if condition="{flexSlider.link}">
<f:then>
<f:link.page pageUid="{flexSlider.link}">
<f:image
src="uploads/tx_mmflexslider/{flexSlider.image}"
alt="{flexSlider.caption}" />
</f:link.page>
</f:then>
<f:else>
<f:image
src="uploads/tx_mmflexslider/{flexSlider.image}"
alt="{flexSlider.caption}" />
</f:else>
</f:if>
<p class="flex-caption">
<f:if condition="{flexSlider.title}">
<strong>{flexSlider.title}</strong>
</f:if>
<f:if condition="{flexSlider.subtitle}">
<span>{flexSlider.subtitle}</span>
</f:if>
</p>
</li>
</f:for>
</ul>
</div>
</f:if>
</f:section>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Andy Hausmann <andy@milkmonkey.de>, Milkmonkey GmbH
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* 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!
***************************************************************/
/**
* Test case for class Tx_Mm_flexslider_Controller_FlexSliderController.
*
* @version $Id$
* @copyright Copyright belongs to the respective authors
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
* @package TYPO3
* @subpackage flexSlider
*
* @author Andy Hausmann <andy@milkmonkey.de>
*/
class Tx_Mm_flexslider_Controller_FlexSliderControllerTest extends Tx_Extbase_Tests_Unit_BaseTestCase {
/**
* @var Tx_FlexSlider_Domain_Model_FlexSlider
*/
protected $fixture;
public function setUp() {
$this->fixture = new Tx_FlexSlider_Domain_Model_FlexSlider();
}
public function tearDown() {
unset($this->fixture);
}
/**
* @test
*/
public function dummyMethod() {
$this->markTestIncomplete();
}
}
?>
\ No newline at end of file
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Andy Hausmann <andy@milkmonkey.de>, Milkmonkey GmbH
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* 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!
***************************************************************/
/**
* Test case for class Tx_FlexSlider_Domain_Model_FlexSlider.
*
* @version $Id$
* @copyright Copyright belongs to the respective authors
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
* @package TYPO3
* @subpackage flexSlider
*
* @author Andy Hausmann <andy@milkmonkey.de>
*/
class Tx_FlexSlider_Domain_Model_FlexSliderTest extends Tx_Extbase_Tests_Unit_BaseTestCase {
/**
* @var Tx_FlexSlider_Domain_Model_FlexSlider
*/
protected $fixture;
public function setUp() {
$this->fixture = new Tx_FlexSlider_Domain_Model_FlexSlider();
}
public function tearDown() {
unset($this->fixture);
}
/**
* @test
*/
public function getTitleReturnsInitialValueForString() { }
/**
* @test
*/
public function setTitleForStringSetsTitle() {
$this->fixture->setTitle('Conceived at T3CON10');
$this->assertSame(
'Conceived at T3CON10',
$this->fixture->getTitle()
);
}
/**
* @test
*/
public function getSubtitleReturnsInitialValueForString() { }
/**
* @test
*/
public function setSubtitleForStringSetsSubtitle() {
$this->fixture->setSubtitle('Conceived at T3CON10');
$this->assertSame(
'Conceived at T3CON10',
$this->fixture->getSubtitle()
);
}
/**
* @test
*/
public function getImageReturnsInitialValueForString() { }
/**
* @test
*/
public function setImageForStringSetsImage() {
$this->fixture->setImage('Conceived at T3CON10');
$this->assertSame(
'Conceived at T3CON10',
$this->fixture->getImage()
);
}
/**
* @test
*/
public function getCaptionReturnsInitialValueForString() { }
/**
* @test
*/
public function setCaptionForStringSetsCaption() {
$this->fixture->setCaption('Conceived at T3CON10');
$this->assertSame(
'Conceived at T3CON10',
$this->fixture->getCaption()
);
}
}
?>
\ No newline at end of file
File added
<?php
########################################################################
# Extension Manager/Repository config file for ext "flexslider".
#
# Auto generated 16-04-2012 20:30
#
# Manual updates:
# Only the data in the array - everything else is removed by next
# writing. "version" and "dependencies" must not be touched!
########################################################################
$EM_CONF[$_EXTKEY] = array(
'title' => 'FlexSlider',
'description' => '',
'category' => 'plugin',
'author' => 'Andy Hausmann',
'author_email' => 'andy@milkmonkey.de',
'author_company' => 'Milkmonkey GmbH',
'shy' => '',
'priority' => '',
'module' => '',
'state' => 'alpha',
'internal' => '',
'uploadfolder' => 1,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'version' => '1.0.0',
'constraints' => array(
'depends' => array(
'extbase' => '1.3.0',
'fluid' => '1.3.0',
),
'conflicts' => array(
),
'suggests' => array(
),
),
'_md5_values_when_last_written' => 'a:24:{s:21:"ExtensionBuilder.json";s:4:"548a";s:12:"ext_icon.gif";s:4:"e922";s:17:"ext_localconf.php";s:4:"fb33";s:14:"ext_tables.php";s:4:"f170";s:14:"ext_tables.sql";s:4:"f50f";s:43:"Classes/Controller/FlexSliderController.php";s:4:"1127";s:35:"Classes/Domain/Model/FlexSlider.php";s:4:"fdb7";s:50:"Classes/Domain/Repository/FlexSliderRepository.php";s:4:"8ed1";s:44:"Configuration/ExtensionBuilder/settings.yaml";s:4:"8bff";s:36:"Configuration/FlexForms/flexform.xml";s:4:"fb9c";s:32:"Configuration/TCA/FlexSlider.php";s:4:"a713";s:38:"Configuration/TypoScript/constants.txt";s:4:"ff79";s:34:"Configuration/TypoScript/setup.txt";s:4:"cd69";s:40:"Resources/Private/Language/locallang.xml";s:4:"23ce";s:43:"Resources/Private/Language/locallang_be.xml";s:4:"2182";s:84:"Resources/Private/Language/locallang_csh_tx_flexslider_domain_model_flexslider.xml";s:4:"bbb7";s:43:"Resources/Private/Language/locallang_db.xml";s:4:"8c66";s:38:"Resources/Private/Layouts/Default.html";s:4:"9749";s:48:"Resources/Private/Templates/FlexSlider/List.html";s:4:"9838";s:35:"Resources/Public/Icons/relation.gif";s:4:"e615";s:66:"Resources/Public/Icons/tx_flexslider_domain_model_flexslider.gif";s:4:"905a";s:50:"Tests/Unit/Controller/FlexSliderControllerTest.php";s:4:"c8a0";s:42:"Tests/Unit/Domain/Model/FlexSliderTest.php";s:4:"dbfa";s:14:"doc/manual.sxw";s:4:"8d2d";}',
);
?>
\ No newline at end of file
ext_icon.gif

177 Bytes

<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
Tx_Extbase_Utility_Extension::configurePlugin(
$_EXTKEY,
'Pi1',
array(
'FlexSlider' => 'list',
),
// non-cacheable actions
array(
'FlexSlider' => '',
)
);
?>
\ No newline at end of file
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
// Build extension name vars - used for plugin registration, flexforms and similar
$extensionName = t3lib_div::underscoredToUpperCamelCase($_EXTKEY);
$pluginSignature = strtolower($extensionName) . '_pi1';
Tx_Extbase_Utility_Extension::registerPlugin(
$_EXTKEY,
'Pi1',
'FlexSlider'
);
// Clean up the Flexform fields in the backend a bit
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,select_key,splash_layout';
// Add own flexform stuff.
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform.xml');
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'FlexSlider');
t3lib_extMgm::addLLrefForTCAdescr('tx_flexslider_domain_model_flexslider', 'EXT:flexslider/Resources/Private/Language/locallang_csh_tx_flexslider_domain_model_flexslider.xml');
t3lib_extMgm::allowTableOnStandardPages('tx_flexslider_domain_model_flexslider');
$TCA['tx_flexslider_domain_model_flexslider'] = array(
'ctrl' => array(
'title' => 'LLL:EXT:flexslider/Resources/Private/Language/locallang_db.xml:tx_flexslider_domain_model_flexslider',
'label' => 'name',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => TRUE,
'versioningWS' => 2,
'versioning_followPages' => TRUE,
'origUid' => 't3_origuid',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'enablecolumns' => array(
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/FlexSlider.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_flexslider_domain_model_flexslider.gif'
),
);
?>
\ No newline at end of file
#
# Table structure for table 'tx_flexslider_domain_model_flexslider'
#
CREATE TABLE tx_flexslider_domain_model_flexslider (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
image text NOT NULL,
link varchar(255) DEFAULT '' NOT NULL,
caption varchar(255) DEFAULT '' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
t3_origuid int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY language (l10n_parent,sys_language_uid)
);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment