idx int64 0 241k | question stringlengths 64 6.21k | target stringlengths 5 803 |
|---|---|---|
16,800 | public static function create ( $ mapping = array ( ) ) { $ defaultMapping = array ( 'autoload' => self :: DEFAULT_INITIALIZER_NS . '\Autoload' , 'dependencies' => self :: DEFAULT_INITIALIZER_NS . '\Dependencies' , 'general-settings' => self :: DEFAULT_INITIALIZER_NS . '\ThemeSettings' , 'customizer' => self :: DEFAULT... | Create the theme configuration . The object will be created and configuration files will be parsed . |
16,801 | public function apply ( ) { foreach ( $ this -> initializers as $ id => $ initializer ) { do_action ( 'baobab/configuration/before-initializer?id=' . $ id ) ; $ initializer -> run ( ) ; do_action ( 'baobab/configuration/after-initializer?id=' . $ id ) ; } } | Apply the configuration |
16,802 | public function getOrThrow ( $ section , $ key ) { if ( ! isset ( $ this -> initializers [ $ section ] ) ) { throw new UnknownSectionException ( $ section ) ; } return $ this -> initializers [ $ section ] -> getSettingOrThrow ( $ key ) ; } | Get the value of a setting in the configuration . If that setting is not found an exception will be thrown . |
16,803 | public function get ( $ section , $ key , $ defaultValue = null ) { if ( ! isset ( $ this -> initializers [ $ section ] ) ) { return $ defaultValue ; } return $ this -> initializers [ $ section ] -> getSetting ( $ key , $ defaultValue ) ; } | Get the value of a setting in the configuration . If that setting is not found return the provided default value . |
16,804 | public function render ( ) { $ renderedChildren = $ this -> renderChildren ( ) ; $ encoding = mb_detect_encoding ( $ renderedChildren ) ; return mb_strtoupper ( $ renderedChildren , $ encoding ) ; } | Converts the rendered children to uppercase . |
16,805 | public static function loadHelpers ( ) { $ helpers = array ( ) ; $ helperDir = Config :: getOption ( "sourceDir" ) . DIRECTORY_SEPARATOR . "_mustache-components/helpers" ; $ helperExt = Config :: getOption ( "mustacheHelperExt" ) ; $ helperExt = $ helperExt ? $ helperExt : "helper.php" ; if ( is_dir ( $ helperDir ) ) {... | Load helpers for the Mustache PatternEngine |
16,806 | public function setSubject ( $ subject ) { if ( $ subject === '' ) { throw new \ InvalidArgumentException ( '$subject must not be empty.' , 1331488802 ) ; } if ( ( strpos ( $ subject , CR ) !== false ) || ( strpos ( $ subject , LF ) !== false ) ) { throw new \ InvalidArgumentException ( '$subject must not contain any l... | Sets the subject of the e - mail . |
16,807 | public function setHTMLMessage ( $ message ) { if ( $ message === '' ) { throw new \ InvalidArgumentException ( '$message must not be empty.' , 1331488845 ) ; } if ( $ this -> hasCssFile ( ) ) { $ this -> loadEmogrifierClass ( ) ; $ emogrifier = new Emogrifier ( $ message , $ this -> getCssFile ( ) ) ; $ messageToStore... | Sets the HTML message of the e - mail . |
16,808 | public function setCssFile ( $ cssFile ) { if ( ! $ this -> cssFileIsCached ( $ cssFile ) ) { $ absoluteFileName = GeneralUtility :: getFileAbsFileName ( $ cssFile ) ; if ( ( $ cssFile !== '' ) && is_readable ( $ absoluteFileName ) ) { self :: $ cssFileCache [ $ cssFile ] = file_get_contents ( $ absoluteFileName ) ; } ... | Sets the CSS file for sending an e - mail . |
16,809 | public function getGroupMembers ( $ groupUids ) { if ( $ groupUids === '' ) { throw new \ InvalidArgumentException ( '$groupUids must not be an empty string.' , 1331488505 ) ; } return $ this -> getListOfModels ( \ Tx_Oelib_Db :: selectMultiple ( '*' , $ this -> getTableName ( ) , $ this -> getUniversalWhereClause ( ) ... | Returns the users which are in the groups with the given UIDs . |
16,810 | public function generateAppCredentials ( $ apiKey , $ apiSecret ) { $ apiKey = urlencode ( $ apiKey ) ; $ apiSecret = urlencode ( $ apiSecret ) ; $ credentials = base64_encode ( "{$apiKey}:{$apiSecret}" ) ; return $ credentials ; } | Generate app credentials |
16,811 | protected function insertMetadata ( $ content , $ entryIdentifier , array $ tags , $ lifetime ) { if ( ! is_string ( $ content ) ) { throw new InvalidDataTypeException ( 'Given data is of type "' . gettype ( $ content ) . '", but a string is expected for string cache.' , 1433155737 ) ; } $ metadata = array ( 'identifie... | Insert metadata into the content |
16,812 | protected function extractMetadata ( $ entryIdentifier , $ content ) { $ separatorIndex = strpos ( $ content , self :: SEPARATOR ) ; if ( $ separatorIndex === false ) { $ exception = new InvalidDataTypeException ( 'Could not find cache metadata in entry with identifier ' . $ entryIdentifier , 1433155925 ) ; if ( $ this... | Extract metadata from the content and store it |
16,813 | public function setLang ( $ lang ) { if ( ! IntuitionUtil :: nonEmptyStr ( $ lang ) ) { return false ; } $ this -> currentLanguage = $ this -> normalizeLang ( $ lang ) ; return true ; } | Set the current language which will be used when requesting messages etc . |
16,814 | protected function getMessagesFunctions ( ) { if ( $ this -> messagesFunctions == null ) { $ this -> messagesFunctions = MessagesFunctions :: getInstance ( $ this -> localBaseDir , $ this ) ; } return $ this -> messagesFunctions ; } | Get an instance of MessagesFunctions . |
16,815 | public function msg ( $ key = 0 , $ options = [ ] , $ fail = null ) { if ( ! IntuitionUtil :: nonEmptyStr ( $ key ) ) { return $ this -> bracketMsg ( $ key , $ fail ) ; } $ defaultOptions = [ 'domain' => $ this -> getDomain ( ) , 'lang' => $ this -> getLang ( ) , 'variables' => [ ] , 'raw-variables' => false , 'escape'... | Get a message from the message blob . |
16,816 | public function setMsg ( $ key , $ message , $ domain = null , $ lang = null ) { $ domain = IntuitionUtil :: nonEmptyStr ( $ domain ) ? $ this -> normalizeDomain ( $ domain ) : $ this -> getDomain ( ) ; $ lang = IntuitionUtil :: nonEmptyStr ( $ lang ) ? $ this -> normalizeLang ( $ lang ) : $ this -> getLang ( ) ; $ thi... | Add or overwrites a message in the blob . |
16,817 | public function setMsgs ( $ messagesByKey , $ domain = null , $ lang = null ) { foreach ( $ messagesByKey as $ key => $ message ) { $ this -> setMsg ( $ key , $ message , $ domain , $ lang ) ; } } | Set multiple messages in the blob . |
16,818 | public function registerDomain ( $ domain , $ dir , $ info = [ ] ) { $ info [ 'dir' ] = $ dir ; $ this -> domainInfos [ $ this -> normalizeDomain ( $ domain ) ] = $ info ; } | Register a custom domain . |
16,819 | public function addDomainInfo ( $ domain , array $ info ) { $ domain = $ this -> normalizeDomain ( $ domain ) ; if ( isset ( $ this -> domainInfos [ $ domain ] ) ) { $ this -> domainInfos [ $ domain ] += $ info ; } } | Store information related to a domain . |
16,820 | public function listMsgs ( $ domain ) { $ domain = $ this -> normalizeDomain ( $ domain ) ; $ this -> ensureLoaded ( $ domain , 'en' ) ; if ( ! isset ( $ this -> messageBlob [ $ domain ] [ 'en' ] ) ) { return [ ] ; } return array_keys ( $ this -> messageBlob [ $ domain ] [ 'en' ] ) ; } | Get all known message keys for a domain . |
16,821 | public function getLangFallbacks ( $ lang ) { if ( self :: $ fallbackCache === null ) { self :: $ fallbackCache = $ this -> fetchLangFallbacks ( ) ; } $ lang = $ this -> normalizeLang ( $ lang ) ; return isset ( self :: $ fallbackCache [ $ lang ] ) ? self :: $ fallbackCache [ $ lang ] : [ 'en' ] ; } | Get fallback chain for a given language . |
16,822 | public function getLangName ( $ lang = false ) { $ lang = $ lang ? $ this -> normalizeLang ( $ lang ) : $ this -> getLang ( ) ; return $ this -> getLangNames ( ) [ $ lang ] ?? '' ; } | Return the language name in the native language . |
16,823 | public function getLangNames ( ) { if ( $ this -> langNames === null ) { $ path = $ this -> localBaseDir . '/language/mw-classes/Names.php' ; if ( ! is_readable ( $ path ) ) { $ this -> errTrigger ( 'Names.php is missing' , __METHOD__ , E_NOTICE ) ; $ this -> langNames = [ ] ; return [ ] ; } require_once $ path ; $ thi... | Return all known languages . |
16,824 | public function addAvailableLang ( $ code , $ name ) { $ this -> getLangNames ( ) ; $ normalizedCode = $ this -> normalizeLang ( $ code ) ; $ this -> langNames [ $ normalizedCode ] = $ name ; $ this -> availableLanguages [ $ normalizedCode ] = $ name ; } | Add a language that isn t listed in Intuition s included language list . |
16,825 | protected function ensureLoaded ( $ domain , $ lang ) { if ( isset ( $ this -> loadedDomains [ $ domain ] [ $ lang ] ) ) { return $ this -> loadedDomains [ $ domain ] [ $ lang ] ; } if ( ! IntuitionUtil :: nonEmptyStrs ( $ domain , $ lang ) || strcspn ( $ domain , ":/\\\000" ) !== strlen ( $ domain ) || strcspn ( $ lan... | Ensure a domain s language is loaded . |
16,826 | protected function setExpiryTrackerCookie ( $ lifetime ) { $ val = time ( ) + $ lifetime ; $ this -> setCookie ( 'track-expire' , $ val , $ lifetime , TSINT_COOKIE_NOTRACK ) ; return true ; } | Browsers don t send the expiration date of cookies with the request In order to keep track of the expiration date we set an additional cookie . |
16,827 | public function renewCookies ( $ lifetime = 2592000 ) { foreach ( $ this -> getCookieNames ( ) as $ key => $ name ) { if ( $ key === 'track-expire' ) { continue ; } if ( isset ( $ _COOKIE [ $ name ] ) ) { $ this -> setCookie ( $ key , $ _COOKIE [ $ name ] , $ lifetime , TSINT_COOKIE_NOTRACK ) ; } } $ this -> setExpiryT... | Renew all cookies |
16,828 | public function wipeCookies ( ) { foreach ( $ this -> getCookieNames ( ) as $ key => $ name ) { $ this -> setCookie ( $ key , '' , - 3600 , TSINT_COOKIE_NOTRACK ) ; unset ( $ _COOKIE [ $ name ] ) ; } return true ; } | Delete all cookies . |
16,829 | public function getCookieExpiration ( ) { $ name = $ this -> getCookieName ( 'track-expire' ) ; return isset ( $ _COOKIE [ $ name ] ) ? intval ( $ _COOKIE [ $ name ] ) : 0 ; } | Get expiration timestamp . |
16,830 | public function getPromoBox ( $ imgSize = 28 , $ helpTranslateDomain = TSINT_HELP_CURRENT ) { if ( is_int ( $ imgSize ) && $ imgSize > 0 ) { $ src = '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Tool_labs_logo.svg/' . '/' . $ imgSize . 'px-Tool_labs_logo.svg.png' ; $ src_2x = '//upload.wikimedia.org/wikipedia/co... | Show a promobox on the bottom of your tool . |
16,831 | public function getDashboardReturnToUrl ( ) { $ p = [ 'returnto' => $ _SERVER [ 'SCRIPT_NAME' ] , 'returntoquery' => http_build_query ( $ _GET ) , ] ; return rtrim ( $ this -> dashboardHome , '/' ) . '/?' . http_build_query ( $ p ) . '#tab-settingsform' ; } | Build a permalink to the dashboard with a returnto query to return to the current page . To be used in other tools . |
16,832 | public function redirectTo ( $ url = 0 , $ code = 302 ) { if ( $ url === null ) { $ this -> redirectTo = null ; return true ; } if ( ! is_string ( $ url ) || ! is_int ( $ code ) ) { return false ; } $ this -> redirectTo = [ $ url , $ code ] ; return true ; } | Redirect or refresh to url . Pass null to undo redirection . |
16,833 | public function dateFormatted ( $ first = null , $ second = null , $ lang = null ) { if ( $ second === null ) { if ( $ first === null ) { $ format = $ this -> msg ( 'dateformat' , 'general' ) ; $ timestamp = time ( ) ; } elseif ( is_int ( $ first ) ) { $ format = $ this -> msg ( 'dateformat' , 'general' ) ; $ timestamp... | Get a localized date . Pass a format time or both . Defaults to the current timestamp in the language s default date format . |
16,834 | protected function initLangSelect ( $ option = null ) { if ( $ option !== null && $ option !== false && $ option !== '' && $ this -> setLang ( $ option ) ) { return true ; } if ( $ this -> getUseRequestParam ( ) ) { $ key = $ this -> paramNames [ 'userlang' ] ; if ( isset ( $ _GET [ $ key ] ) && $ this -> setLang ( $ _... | Check language choice tree . |
16,835 | public function isRtl ( $ lang = null ) { static $ rtlLanguages = null ; $ lang = $ lang ? $ this -> normalizeLang ( $ lang ) : $ this -> getLang ( ) ; if ( $ rtlLanguages === null ) { $ file = $ this -> localBaseDir . '/language/rtl.json' ; $ rtlLanguages = json_decode ( file_get_contents ( $ file ) , true ) ; } retur... | Whether the language is right - to - left |
16,836 | public function delete ( ) { $ url = "entities" ; if ( $ this -> _id ) { $ url .= "/{$this->_id}" ; } if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } return $ this -> _orion -> delete ( $ url ) ; } | Delete current Entity |
16,837 | public function getAttribute ( $ attr ) { $ url = "entities/{$this->_id}/attrs/$attr" ; if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } return $ this -> _orion -> get ( $ url ) ; } | Get Attribute Data |
16,838 | public function getAttributeValue ( $ attr , & $ request = null ) { $ url = "entities/{$this->_id}/attrs/$attr/value" ; if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } return $ this -> _orion -> get ( $ url , $ request , "text/plain" , "text/plain" ) ; } | Get Attribute Value |
16,839 | public function deleteAttribute ( $ attr ) { $ url = "entities/{$this->_id}/attrs/$attr" ; if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } return $ this -> _orion -> delete ( $ url ) ; } | Remove a single attribute |
16,840 | public function replaceAttributes ( array $ attrs ) { $ url = "entities/{$this->_id}/attrs" ; if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } $ updateEntity = new ContextFactory ( $ attrs ) ; return $ this -> _orion -> put ( $ url , $ updateEntity ) ; } | Replace all entity Attributes |
16,841 | public function appendAttribute ( $ attr , $ value , $ type , $ metadata = null , $ options = [ ] ) { $ attrs = [ $ attr => [ "value" => $ value , "type" => $ type ] ] ; if ( $ metadata != null ) { $ attrs [ 'metadata' ] = $ metadata ; } return $ this -> appendAttributes ( $ attrs , $ options ) ; } | Update or Append new attribute |
16,842 | public function appendAttributes ( array $ attrs , $ options = [ "option" => "append" ] ) { $ url = "entities/{$this->_id}/attrs" ; if ( $ this -> _type ) { $ url .= "?type={$this->_type}" ; } if ( count ( $ options ) > 0 ) { $ prefix = ( $ this -> _type ) ? "&" : "?" ; $ url .= $ prefix . urldecode ( http_build_query ... | Update or Append new attributes |
16,843 | private function coordsQueryString ( array $ coords ) { $ count = count ( $ coords ) ; if ( $ count == 2 ) { if ( is_numeric ( $ coords [ 0 ] ) && is_numeric ( $ coords [ 1 ] ) ) { return implode ( ',' , array_reverse ( $ coords ) ) ; } elseif ( is_array ( $ coords [ 0 ] ) && is_array ( $ coords [ 1 ] ) ) { foreach ( $... | Method thats allow to convert geoJson coordinate format into Orion coords query strinng format . |
16,844 | public function geoQuery ( $ georel , $ geoJson , array $ modifiers = [ ] , array $ options = [ ] , & $ request = null ) { if ( is_string ( $ geoJson ) ) { $ geoJson = json_decode ( $ geoJson ) ; } elseif ( is_array ( $ geoJson ) ) { $ geoJson = ( object ) $ geoJson ; } if ( $ geoJson == null ) { throw new \ Exception ... | Geo Spatial handler method |
16,845 | public function getCoveredBy ( $ geoJson , array $ modifiers = [ ] , array $ options = [ ] , & $ request = null ) { return $ this -> geoQuery ( "coveredBy" , $ geoJson , $ modifiers , $ options , $ request ) ; } | Denotes that matching entities are those that exist entirely within the reference geometry . When resolving a query of this type the border of the shape must be considered to be part of the shape |
16,846 | public function getIntersections ( $ geoJson , array $ modifiers = [ ] , array $ options = [ ] , & $ request = null ) { return $ this -> geoQuery ( "intersects" , $ geoJson , $ modifiers , $ options , $ request ) ; } | Denotes that matching entities are those intersecting with the reference geometry |
16,847 | public function getDisjoints ( $ geoJson , array $ modifiers = [ ] , array $ options = [ ] , & $ request = null ) { return $ this -> geoQuery ( "disjoint" , $ geoJson , $ modifiers , $ options , $ request ) ; } | Denotes that matching entities are those not intersecting with the reference geometry |
16,848 | public function getGeoEquals ( $ geoJson , array $ modifiers = [ ] , array $ options = [ ] , & $ request ) { return $ this -> geoQuery ( "equals" , $ geoJson , $ modifiers , $ options , $ request ) ; } | The geometry associated to the position of matching entities and the reference geometry must be exactly the same |
16,849 | public function init ( $ logFilePrefix ) { self :: $ logFileName = date ( 'Y-m-d_H-i-s' ) . '-' . ucfirst ( $ logFilePrefix ) . '-' . md5 ( time ( ) ) . '.log' ; $ ssl = null ; $ this -> writeLog ( sprintf ( $ this -> debugStrings [ 'start' ] , date ( 'Y-m-d H:i:s' ) ) ) ; if ( in_array ( 'curl' , get_loaded_extensions... | Initialisation of the debug log stores information about the environment . |
16,850 | public function logParamsSet ( $ paramsArray ) { $ paramsString = '' ; foreach ( $ paramsArray as $ k => $ v ) { $ paramsString .= "$k=$v\r\n" ; } $ this -> writeLog ( sprintf ( $ this -> debugStrings [ 'params set' ] , date ( 'Y-m-d H:i:s' ) , $ paramsString ) ) ; } | Logs parameters which were set before sending . |
16,851 | public function logReplyParams ( $ params ) { $ paramsString = '' ; foreach ( $ params as $ k => $ v ) { $ paramsString .= "$k=" . print_r ( $ v , true ) . "\r\n" ; } $ this -> writeLog ( sprintf ( $ this -> debugStrings [ 'replyParams' ] , date ( 'Y-m-d H:i:s' ) , $ paramsString ) ) ; } | Logs processed reply params from json array |
16,852 | public function logNotificationInput ( $ paramsArray ) { $ this -> writeLog ( sprintf ( $ this -> debugStrings [ 'notifyInput' ] , date ( 'Y-m-d H:i:s' ) , print_r ( $ paramsArray , 1 ) ) ) ; } | Logs parameters which were used for Notification |
16,853 | public function logNotificationParams ( $ paramsArray ) { $ this -> writeLog ( sprintf ( $ this -> debugStrings [ 'notifyParams' ] , date ( 'Y-m-d H:i:s' ) , print_r ( $ paramsArray , 1 ) ) ) ; } | logs parameters which were used for Notification |
16,854 | public function writeLog ( $ string ) { $ Config = GiroCheckout_SDK_Config :: getInstance ( ) ; $ path = str_replace ( '\\' , '/' , $ Config -> getConfig ( 'DEBUG_LOG_PATH' ) ) ; if ( ! is_dir ( $ path ) ) { if ( ! mkdir ( $ path ) ) { error_log ( 'Log directory does not exist. Please create directory: ' . $ path . '.'... | Writes log into log file |
16,855 | public function register ( $ compiler ) { $ this -> registerStartLoopQuery ( $ compiler ) ; $ this -> registerEmptyLoopBranch ( $ compiler ) ; $ this -> registerEndLoop ( $ compiler ) ; } | Register the extension in the compiler |
16,856 | public function setOrderSequence ( $ orderSequence ) { if ( false === in_array ( $ orderSequence , DataTablesEnumerator :: enumOrderSequences ( ) ) ) { $ orderSequence = null ; } $ this -> orderSequence = $ orderSequence ; return $ this ; } | Set the order sequence . |
16,857 | public function add ( $ object ) { if ( is_a ( $ object , 'Closure' ) ) { return $ this -> closures [ ] = $ object ; } $ this -> validateObject ( $ object ) ; $ data = $ object -> getSitemapData ( ) ; $ this -> addRaw ( $ data ) ; } | Add a SitemapAware object to the sitemap . |
16,858 | public function addAll ( $ objects ) { if ( is_a ( $ objects , 'Closure' ) ) { return $ this -> closures [ ] = $ objects ; } foreach ( $ objects as $ object ) { $ this -> add ( $ object ) ; } } | Add multiple SitemapAware objects to the sitemap . |
16,859 | public function addRaw ( $ data ) { $ this -> validateData ( $ data ) ; $ data [ 'location' ] = trim ( $ data [ 'location' ] , '/' ) ; $ this -> entries [ ] = $ this -> replaceAttributes ( $ data ) ; } | Add a raw entry to the sitemap . |
16,860 | public function contains ( $ url ) { $ url = trim ( $ url , '/' ) ; foreach ( $ this -> entries as $ entry ) { if ( $ entry [ 'loc' ] == $ url ) { return TRUE ; } } return FALSE ; } | Check if the sitemap contains an url . |
16,861 | public function generateIndex ( ) { $ this -> loadClosures ( ) ; $ xml = new XMLWriter ( ) ; $ xml -> openMemory ( ) ; $ xml -> writeRaw ( '<?xml version="1.0" encoding="UTF-8"?>' ) ; $ xml -> writeRaw ( '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' ) ; foreach ( $ this -> entries as $ data ) { $... | Generate the xml for the sitemap . |
16,862 | protected function replaceAttributes ( $ data ) { foreach ( $ data as $ attribute => $ value ) { $ replacement = $ this -> replaceAttribute ( $ attribute ) ; unset ( $ data [ $ attribute ] ) ; $ data [ $ replacement ] = $ value ; } return $ data ; } | Replace the attribute names with their replacements . |
16,863 | protected function replaceAttribute ( $ attribute ) { if ( array_key_exists ( $ attribute , $ this -> replacements ) ) { return $ this -> replacements [ $ attribute ] ; } return $ attribute ; } | Replace an attribute with it s replacement if available . |
16,864 | protected function loadClosures ( ) { foreach ( $ this -> closures as $ closure ) { $ instance = $ closure ( ) ; if ( is_array ( $ instance ) || $ instance instanceof Traversable ) { $ this -> addAll ( $ instance ) ; } else { $ this -> add ( $ instance ) ; } } } | Load the lazy loaded elements . |
16,865 | protected function checkTemplateFile ( $ canUseFlexforms = false ) { if ( TYPO3_MODE === 'BE' ) { return ; } $ this -> checkForNonEmptyString ( 'templateFile' , $ canUseFlexforms , 's_template_special' , 'This value specifies the HTML template which is essential when ' . 'creating any output from this extension.' ) ; i... | Checks whether the HTML template is provided and the file exists . |
16,866 | public function checkForNonEmptyString ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ value = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; $ this -> checkForNonEmptyStringValue ( $ value , $ fieldName , $ canUseFlexforms , $ explanation ) ; } | Checks whether a configuration value contains a non - empty - string . |
16,867 | protected function checkIfSingleInSetNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , array $ allowedValues ) { $ this -> checkForNonEmptyString ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfSingleInSetOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ expla... | Checks whether a configuration value is non - empty and lies within a set of allowed values . |
16,868 | protected function checkIfSingleInSetOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , array $ allowedValues ) { if ( $ this -> objectToCheck -> hasConfValueString ( $ fieldName , $ sheet ) ) { $ value = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; $ this -> checkIfSingl... | Checks whether a configuration value either is empty or lies within a set of allowed values . |
16,869 | protected function checkIfBoolean ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkIfSingleInSetNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , [ '0' , '1' ] ) ; } | Checks whether a configuration value has a boolean value . |
16,870 | protected function checkIfMultiInSetOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , array $ allowedValues ) { if ( $ this -> objectToCheck -> hasConfValueString ( $ fieldName , $ sheet ) ) { $ allValues = GeneralUtility :: trimExplode ( ',' , $ this -> objectToCheck -> getConfValueString ( $ field... | Checks whether a configuration value either is empty or its comma - separated values lie within a set of allowed values . |
16,871 | public function checkIfSingleInTableNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ tableName ) { $ this -> checkIfSingleInSetNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ this -> getDbColumnNames ( $ tableName ) ) ; } | Checks whether a configuration value is non - empty and is one of the column names of a given DB table . |
16,872 | protected function checkIfSingleInTableOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ tableName ) { $ this -> checkIfSingleInSetOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ this -> getDbColumnNames ( $ tableName ) ) ; } | Checks whether a configuration value either is empty or is one of the column names of a given DB table . |
16,873 | protected function checkIfMultiInTableOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ tableName ) { $ this -> checkIfMultiInSetOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ this -> getDbColumnNames ( $ tableName ) ) ; } | Checks whether a configuration value either is empty or its comma - separated values is a column name of a given DB table . |
16,874 | protected function checkRegExp ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ regExp ) { $ value = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; if ( ! preg_match ( $ regExp , $ value ) ) { $ message = 'The TS setup variable <strong>' . $ this -> getTSSetupPath ( ) . $ field... | Checks whether a configuration value matches a regular expression . |
16,875 | protected function checkRegExpNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ regExp ) { $ this -> checkForNonEmptyString ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkRegExp ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ regExp ) ; } | Checks whether a configuration value is non - empty and matches a regular expression . |
16,876 | protected function checkIfFePagesNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkForNonEmptyString ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfFePagesOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; } | Checks whether a configuration value is non - empty and contains a comma - separated list of front - end PIDs . |
16,877 | protected function checkIfSingleFePageNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkIfPositiveInteger ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfFePagesOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; } | Checks whether a configuration value is non - empty and contains a single front - end PID . |
16,878 | protected function checkIfSingleFePageOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkIfInteger ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfFePagesOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; } | Checks whether a configuration value either is empty or contains a single front - end PID . |
16,879 | protected function checkIfSysFoldersNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkForNonEmptyString ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfSysFoldersOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; } | Checks whether a configuration value is non - empty and contains a comma - separated list of system folder PIDs . |
16,880 | protected function checkIfSingleSysFolderNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkIfPositiveInteger ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfSysFoldersOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; } | Checks whether a configuration value is non - empty and contains a single system folder PID . |
16,881 | protected function checkIfSingleSysFolderOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ this -> checkIfInteger ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIfSysFoldersOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; } | Checks whether a configuration value either is empty or contains a single system folder PID . |
16,882 | protected function checkIfSysFoldersOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) { $ pids = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; if ( ( $ pids === '' ) || ( strrpos ( $ pids , ',' ) !== false ) ) { $ message = 'All the selected pages need to be system folder... | Checks whether a configuration value either is empty or contains a comma - separated list of system folder PIDs . |
16,883 | protected function checkPageTypeOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation , $ typeCondition ) { $ this -> checkIfPidListOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; if ( $ this -> objectToCheck -> hasConfValueString ( $ fieldName , $ sheet ) ) { $ pids = $ this -> ob... | Checks whether a configuration value either is empty or contains a comma - separated list of PIDs that specify pages or a given type . |
16,884 | protected function checkListViewIfSingleInSetNotEmpty ( $ fieldName , $ explanation , array $ allowedValues ) { $ fieldSubPath = 'listView.' . $ fieldName ; $ value = $ this -> objectToCheck -> getListViewConfValueString ( $ fieldName ) ; $ this -> checkForNonEmptyStringValue ( $ value , $ fieldSubPath , false , $ expl... | Checks whether a configuration value in listView . is non - empty and lies within a set of allowed values . |
16,885 | public function checkIsValidEmailOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ unused , $ explanation ) { $ value = $ this -> objectToCheck -> getConfValueString ( $ fieldName , $ sheet ) ; if ( $ value === '' ) { return ; } if ( ! GeneralUtility :: validEmail ( $ value ) ) { $ message = 'The e-mail address i... | Checks that an e - mail address is valid or empty . |
16,886 | public function checkIsValidEmailNotEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ allowInternalAddresses , $ explanation ) { $ this -> checkForNonEmptyString ( $ fieldName , $ canUseFlexforms , $ sheet , $ explanation ) ; $ this -> checkIsValidEmailOrEmpty ( $ fieldName , $ canUseFlexforms , $ sheet , $ allowIn... | Checks that an e - mail address is valid and non - empty . |
16,887 | private function setLanguageKeyFromConfiguration ( \ Tx_Oelib_Configuration $ configuration ) { if ( ! $ configuration -> hasString ( 'language' ) ) { return ; } $ this -> languageKey = $ configuration -> getAsString ( 'language' ) ; if ( $ configuration -> hasString ( 'language_alt' ) ) { $ this -> alternativeLanguage... | Reads the language key from a configuration and sets it as current language . Also sets the alternate language if one is configured . |
16,888 | private function initializeBackEnd ( ) { $ backEndUser = \ Tx_Oelib_BackEndLoginManager :: getInstance ( ) -> getLoggedInUser ( \ Tx_Oelib_Mapper_BackEndUser :: class ) ; $ this -> languageKey = $ backEndUser -> getLanguage ( ) ; } | Initializes the TranslatorRegistry for the back end . |
16,889 | private function getByExtensionName ( $ extensionName ) { if ( $ extensionName === '' ) { throw new \ InvalidArgumentException ( 'The parameter $extensionName must not be empty.' , 1331489578 ) ; } if ( ! ExtensionManagementUtility :: isLoaded ( $ extensionName ) ) { throw new \ BadMethodCallException ( 'The extension ... | Gets a Translator by its extension name . |
16,890 | private function getLocalizedLabelsFromFile ( $ extensionKey ) { if ( $ extensionKey === '' ) { throw new \ InvalidArgumentException ( '$extensionKey must not be empty.' , 1331489618 ) ; } $ languageFactory = GeneralUtility :: makeInstance ( LocalizationFactory :: class ) ; $ languageFile = 'EXT:' . $ extensionKey . '/... | Returns the localized labels from an extension s language file . |
16,891 | private function getLocalizedLabelsFromTypoScript ( $ extensionName ) { if ( $ extensionName === '' ) { throw new \ InvalidArgumentException ( 'The parameter $extensionName must not be empty.' , 1331489630 ) ; } $ result = [ ] ; $ namespace = 'plugin.tx_' . $ extensionName . '._LOCAL_LANG.' . $ this -> languageKey ; $ ... | Returns the localized labels from an extension s TypoScript setup . |
16,892 | public function getCurrent ( ) { if ( is_null ( $ this -> current ) ) { $ siteView = $ this -> makeNewViewModel ( ) ; $ this -> current = $ siteView ; } return $ this -> current ; } | Returns the current site view instance creates if it is not created already |
16,893 | protected function collectVisitData ( ) { $ request = $ this -> request ; $ user = $ request -> user ( ) ; $ userId = $ user ? $ user -> getKey ( ) : null ; return [ 'user_id' => $ userId , 'http_referer' => $ request -> server ( 'HTTP_REFERER' ) , 'url' => $ request -> fullUrl ( ) , 'request_method' => $ request -> me... | Collects the data for the site view model |
16,894 | public function saveCurrent ( ) { if ( $ this -> saveEnabled ( ) && $ this -> isViewValid ( ) && $ this -> isViewUnique ( ) ) { $ success = $ this -> saveCurrentModel ( ) ; if ( $ success ) { $ this -> storeCurrentHash ( ) ; $ this -> saveTrackables ( $ this -> getCurrent ( ) , $ success ) ; } return $ success ; } retu... | Persists the current site view to database |
16,895 | public function isViewUnique ( ) { $ hash = $ this -> getCurrentHash ( ) ; if ( in_array ( $ hash , $ this -> session -> get ( 'tracker.views' , [ ] ) ) ) { return false ; } return true ; } | Checks if the current request is unique |
16,896 | protected function getCurrentHash ( ) { if ( $ this -> currentHash === null ) { $ this -> currentHash = md5 ( $ this -> request -> fullUrl ( ) . $ this -> request -> method ( ) . $ this -> request -> getClientIp ( ) ) ; } return $ this -> currentHash ; } | Gets the view hash |
16,897 | protected function saveCurrentModel ( ) { $ current = $ this -> getCurrent ( ) ; $ current -> setAttribute ( 'app_time' , $ this -> getCurrentRuntime ( ) ) ; $ current -> setAttribute ( 'memory' , memory_get_peak_usage ( true ) ) ; return $ current -> save ( ) ; } | Saves the current model |
16,898 | protected function saveTrackables ( $ view , $ success ) { foreach ( $ this -> trackables as $ trackable ) { $ trackable -> attachTrackerView ( $ view ) ; } return $ success ; } | Saves the trackables |
16,899 | public function flushOlderThanOrBetween ( $ until = null , $ from = null ) { $ modelName = $ this -> getViewModelName ( ) ; return $ modelName :: olderThanOrBetween ( $ until , $ from ) -> delete ( ) ; } | Flush older than or between SiteViews |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.