示例#1
0
 /**
  * @param int $state State to log
  * @param User $user Related User
  * @param array $additionalProperties for individual logging
  * @return void
  */
 public static function log($state, User $user, array $additionalProperties = [])
 {
     if (!ConfigurationUtility::isDisableLogActive()) {
         $log = self::getLog();
         $log->setTitle(LocalizationUtility::translateByState($state));
         $log->setState($state);
         $log->setUser($user);
         self::getLogRepository()->add($log);
     }
     self::getDispatcher()->dispatch(__CLASS__, __FUNCTION__ . 'Custom', [$state, $user, $additionalProperties]);
 }
示例#2
0
<?php

/**
 * Table configuration fe_users
 */
$feUsersColumns = ['gender' => ['exclude' => 0, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'tx_femanager_domain_model_user.gender', 'config' => ['type' => 'radio', 'items' => [['LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'tx_femanager_domain_model_user.gender.item0', '0'], ['LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'tx_femanager_domain_model_user.gender.item1', '1']]]], 'date_of_birth' => ['exclude' => 0, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'tx_femanager_domain_model_user.dateOfBirth', 'config' => ['type' => 'input', 'size' => 10, 'max' => 20, 'eval' => 'date', 'checkbox' => '0', 'default' => '']], 'crdate' => ['exclude' => 1, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'fe_users.crdate', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'datetime', 'readOnly' => 1, 'default' => time()]], 'tstamp' => ['exclude' => 1, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'fe_users.tstamp', 'config' => ['type' => 'input', 'size' => 30, 'eval' => 'datetime', 'readOnly' => 1, 'default' => time()]], 'tx_femanager_confirmedbyuser' => ['exclude' => 1, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'fe_users.registrationconfirmedbyuser', 'config' => ['type' => 'check', 'default' => 0]], 'tx_femanager_confirmedbyadmin' => ['exclude' => 1, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:' . 'fe_users.registrationconfirmedbyadmin', 'config' => ['type' => 'check', 'default' => 0]]];
$fields = 'crdate, tstamp, tx_femanager_confirmedbyuser, tx_femanager_confirmedbyadmin';
if (!\In2code\Femanager\Utility\ConfigurationUtility::isDisableLogActive()) {
    $feUsersColumns['tx_femanager_log'] = ['exclude' => 1, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:fe_users.log', 'config' => ['type' => 'inline', 'foreign_table' => 'tx_femanager_domain_model_log', 'foreign_field' => 'user', 'maxitems' => 1000, 'minitems' => 0, 'appearance' => ['collapseAll' => 1, 'expandSingle' => 1]]];
    $fields .= ', tx_femanager_log';
}
$feUsersColumns['tx_femanager_changerequest'] = ['exclude' => 1, 'label' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:fe_users.changerequest', 'config' => ['type' => 'text', 'cols' => '40', 'rows' => '15', 'wrap' => 'off', 'readOnly' => 1]];
$fields .= ', tx_femanager_changerequest';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'gender, date_of_birth', '', 'after:name');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $feUsersColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', '--div--;LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:fe_users.tab, ' . $fields);
示例#3
0
<?php

if (!defined('TYPO3_MODE')) {
    die('Access denied.');
}
/**
 * FE Plugin
 */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('femanager', 'Pi1', 'FE_Manager');
/**
 * Include Backend Module
 */
if (!\In2code\Femanager\Utility\ConfigurationUtility::isDisableModuleActive() && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('In2code.femanager', 'web', 'm1', '', ['UserBackend' => 'list,userLogout'], ['access' => 'user,group', 'icon' => 'EXT:femanager/ext_icon.svg', 'labels' => 'LLL:EXT:femanager/Resources/Private/Language/locallang_mod.xlf']);
}
/**
 * Static TypoScript
 */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('femanager', 'Configuration/TypoScript/Main', 'Main Settings');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('femanager', 'Configuration/TypoScript/Layout', 'Add Layout CSS');
/**
 * Flexform
 */
$pluginSignature = str_replace('_', '', 'femanager') . '_pi1';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:femanager/Configuration/FlexForms/FlexFormPi1.xml');
/**
 * Disable non needed fields in tt_content
 */
$TCA['tt_content']['types']['list']['subtypes_excludelist']['femanager_pi1'] = 'select_key';