idx
int64
0
60.3k
question
stringlengths
92
4.62k
target
stringlengths
7
635
38,700
public static function getChampionSplashUrl ( string $ champion_name , int $ skin = 0 ) : string { return self :: getSetting ( self :: SET_ENDPOINT ) . "img/champion/splash/{$champion_name}_{$skin}.jpg" ; }
Returns champion splash image URL .
38,701
public static function getChampionSplash ( string $ champion_name , int $ skin = 0 , array $ attributes = [ ] ) : Html { $ attrs = array_merge ( [ 'alt' => $ champion_name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :...
Returns champion splash image in img HTML TAG .
38,702
public static function getChampionSplashO ( StaticChampionDto $ champion , int $ skin = 0 , array $ attributes = [ ] ) : Html { return self :: getChampionSplash ( $ champion -> id , $ skin , $ attributes ) ; }
Returns champion splash from API static - data Champion object in img HTML TAG .
38,703
public static function getChampionLoadingUrl ( string $ champion_name , int $ skin = 0 ) : string { return self :: getSetting ( self :: SET_ENDPOINT ) . "img/champion/loading/{$champion_name}_{$skin}.jpg" ; }
Returns champion loading screen image URL .
38,704
public static function getChampionLoading ( string $ champion_name , int $ skin = 0 , array $ attributes = [ ] ) : Html { $ attrs = array_merge ( [ 'alt' => $ champion_name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self ...
Returns champion loading screen image in img HTML TAG .
38,705
public static function getChampionLoadingO ( StaticChampionDto $ champion , int $ skin = 0 , array $ attributes = [ ] ) : Html { return self :: getChampionLoading ( $ champion -> id , $ skin , $ attributes ) ; }
Returns champion loading screen image from API static - data Champion object in img HTML TAG .
38,706
public static function getChampionIconUrl ( string $ champion_name ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/champion/{$champion_name}.png" ; }
Returns champion icon URL .
38,707
public static function getChampionIcon ( string $ champion_name , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ champion_name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( s...
Returns champion icon in img HTML TAG .
38,708
public static function getChampionIconO ( StaticChampionDto $ champion , array $ attributes = [ ] ) : Html { return self :: getChampionIcon ( $ champion -> id , $ attributes ) ; }
Returns champion icon from API static - data Champion object in img HTML TAG .
38,709
public static function getFromSprite ( string $ source , int $ x , int $ y , int $ w = 48 , int $ h = 48 , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => 'Sprite Icon' ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = i...
Returns icon from icon sprite in img HTML TAG .
38,710
public static function getFromSpriteO ( StaticImageDto $ image , array $ attributes = [ ] ) : Html { return self :: getFromSprite ( $ image -> sprite , $ image -> x , $ image -> y , $ image -> w , $ image -> h , $ attributes ) ; }
Returns icon from API static - data ImageDto object in img HTML TAG .
38,711
public static function getSpellIconUrl ( string $ spell_name ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/spell/{$spell_name}.png" ; }
Returns spell icon URL .
38,712
public static function getSpellIcon ( string $ spell_name , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ spell_name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SE...
Returns spell or summoner spell icon in img HTML TAG .
38,713
public static function getSummonerSpellIconO ( StaticSummonerSpellDto $ summonerSpell , array $ attributes = [ ] ) : Html { return self :: getSpellIcon ( $ summonerSpell -> id , $ attributes ) ; }
Returns summoner spell icon from API static - data SummonerSpell object in img HTML TAG .
38,714
public static function getChampionSpellIconO ( StaticChampionSpellDto $ championSpell , array $ attributes = [ ] ) : Html { return self :: getSpellIcon ( $ championSpell -> id , $ attributes ) ; }
Returns spell icon from API static - data ChampionSpell object in img HTML TAG .
38,715
public static function getItemIconUrl ( int $ item_id ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/item/{$item_id}.png" ; }
Returns item icon URL .
38,716
public static function getItemIcon ( int $ item_id , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ item_id ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SET_DEFAULT_...
Returns item icon in img HTML TAG .
38,717
public static function getItemIconO ( StaticItemDto $ item , array $ attributes = [ ] ) : Html { return self :: getItemIcon ( $ item -> id , $ attributes ) ; }
Returns item icon from API static - data Item object in img HTML TAG .
38,718
public static function getMasteryIconUrl ( int $ mastery_id ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/mastery/{$mastery_id}.png" ; }
Return mastery icon URL .
38,719
public static function getMasteryIcon ( int $ mastery_id , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ mastery_id ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SET...
Returns mastery icon in img HTML TAG .
38,720
public static function getMasteryIconO ( StaticMasteryDto $ mastery , array $ attributes = [ ] ) : Html { return self :: getMasteryIcon ( $ mastery -> id , $ attributes ) ; }
Returns mastery icon from API static - data Mastery object in img HTML TAG .
38,721
public static function getRuneIconUrl ( int $ rune_id ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/rune/{$rune_id}.png" ; }
Returns rune icon URL .
38,722
public static function getRuneIcon ( int $ rune_id , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ rune_id ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SET_DEFAULT_...
Returns rune icon in img HTML TAG .
38,723
public static function getRuneIconO ( StaticRuneDto $ rune , array $ attributes = [ ] ) : Html { return self :: getRuneIcon ( $ rune -> id , $ attributes ) ; }
Returns rune icon from API static - data Rune object in img HTML TAG .
38,724
public static function getReforgedRuneIconO ( StaticReforgedRuneDto $ rune , array $ attributes = [ ] ) : Html { $ attrs = array_merge ( [ 'alt' => $ rune -> name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SET_DEF...
Returns reforged rune icon from API static - data ReforgedRune object in img HTML TAG .
38,725
public static function getReforgedRunePathIconO ( StaticReforgedRunePathDto $ runePath , array $ attributes = [ ] ) : Html { $ attrs = array_merge ( [ 'alt' => $ runePath -> name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting (...
Returns reforged rune path from API static - data ReforgedRunePath object in img HTML TAG .
38,726
public static function getMinimapUrl ( int $ map_id ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/map/map{$map_id}.png" ; }
Returns minimap image URL .
38,727
public static function getMinimap ( int $ map_id , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ map_id ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SET_DEFAULT_CLA...
Returns minimap image in img HTML TAG .
38,728
public static function getMinimapO ( StaticMapDetailsDto $ mapDetails , array $ attributes = [ ] ) : Html { return self :: getMinimap ( $ mapDetails -> mapId , $ attributes ) ; }
Returns minimap from API static - data MapDetails object in img HTML TAG .
38,729
public static function getScoreboardIconUrl ( string $ name ) : string { self :: checkInit ( ) ; return self :: getSetting ( self :: SET_ENDPOINT ) . self :: getSetting ( self :: SET_VERSION ) . "/img/ui/{$name}.png" ; }
Returns UI icon URL .
38,730
public static function getScoreboardIcon ( string $ name , array $ attributes = [ ] ) : Html { self :: checkInit ( ) ; $ attrs = array_merge ( [ 'alt' => $ name ] , self :: getSetting ( self :: SET_CUSTOM_IMG_ATTRS , [ ] ) , $ attributes ) ; $ attrs [ 'class' ] = implode ( ' ' , [ self :: getSetting ( self :: SET_DEFAU...
Returns UI icon in img HTML TAG .
38,731
public function load ( string $ hash ) { return $ this -> isCached ( $ hash ) ? $ this -> cache [ $ hash ] [ 'data' ] : false ; }
Loads cached data for given call .
38,732
public function canCall ( string $ api_key , string $ region , string $ resource , string $ endpoint ) : bool { return $ this -> storage -> canCall ( $ api_key , $ region , $ resource , $ endpoint ) ; }
Determines whether or not API call can be made
38,733
public static function getIterablePropertyName ( string $ phpDocComment ) { preg_match ( '/@iterable\s\$([\w]+)/' , $ phpDocComment , $ matches ) ; if ( isset ( $ matches [ 1 ] ) ) return $ matches [ 1 ] ; return false ; }
Returns name of iterable property specified in PHPDoc comment .
38,734
public static function getLinkablePropertyData ( string $ phpDocComment ) { preg_match ( '/@linkable\s(?<function>[\w]+)(?:\(\$(?<parameter>[\w]+)+?\))?/' , $ phpDocComment , $ matches ) ; $ matches = array_filter ( $ matches , function ( $ v , $ k ) { return is_string ( $ k ) ; } , ARRAY_FILTER_USE_BOTH ) ; if ( @ $ m...
Returns data of linkable property specified in PHPDoc comment .
38,735
public function removeRawContent ( $ contentId ) { $ this -> locationGateway -> removeElementFromTrash ( $ this -> loadContentInfo ( $ contentId ) -> mainLocationId ) ; foreach ( $ this -> listVersions ( $ contentId ) as $ versionInfo ) { $ this -> fieldHandler -> deleteFields ( $ contentId , $ versionInfo ) ; } $ this...
Deletes raw content data .
38,736
public function getParameterProvider ( $ fieldTypeIdentifier ) { if ( ! isset ( $ this -> providers [ $ fieldTypeIdentifier ] ) ) { throw new InvalidArgumentException ( "No parameter provider found for '$fieldTypeIdentifier' field type." ) ; } return $ this -> providers [ $ fieldTypeIdentifier ] ; }
Returns parameter provider for given field type identifier .
38,737
public function getFieldDefinitions ( ) { $ fieldDefinitions = array ( ) ; foreach ( $ this -> fieldDefinitionReferences as $ reference ) { $ fieldDefinitions [ ] = $ this -> contentTypeService -> loadFieldDefinition ( $ reference ) ; } return $ fieldDefinitions ; }
Fetches and returns the field definitions contained in the list .
38,738
public function createAsset ( string $ name , ImageValue $ image , string $ languageCode ) : Content { $ contentType = $ this -> contentTypeService -> loadContentTypeByIdentifier ( $ this -> mappings [ 'content_type_identifier' ] ) ; $ contentCreateStruct = $ this -> contentService -> newContentCreateStruct ( $ content...
Creates an Image Asset .
38,739
public function getAssetField ( Content $ content ) : Field { if ( ! $ this -> isAsset ( $ content ) ) { throw new InvalidArgumentException ( 'contentId' , "Content {$content->id} is not a image asset!" ) ; } return $ content -> getField ( $ this -> mappings [ 'content_field_identifier' ] ) ; }
Returns field which is used to store the Image Asset value from specified content .
38,740
public function getAssetFieldDefinition ( ) : FieldDefinition { $ contentType = $ this -> contentTypeService -> loadContentTypeByIdentifier ( $ this -> mappings [ 'content_type_identifier' ] ) ; return $ contentType -> getFieldDefinition ( $ this -> mappings [ 'content_field_identifier' ] ) ; }
Returns definition of the field which is used to store value of the Image Asset .
38,741
public function getAssetValue ( Content $ content ) : ImageValue { if ( ! $ this -> isAsset ( $ content ) ) { throw new InvalidArgumentException ( 'contentId' , "Content {$content->id} is not a image asset!" ) ; } return $ content -> getFieldValue ( $ this -> mappings [ 'content_field_identifier' ] ) ; }
Returns field value of the Image Asset from specified content .
38,742
public function isAsset ( Content $ content ) : bool { if ( $ this -> contentTypeId === null ) { $ contentType = $ this -> contentTypeService -> loadContentTypeByIdentifier ( $ this -> mappings [ 'content_type_identifier' ] ) ; $ this -> contentTypeId = $ contentType -> id ; } return $ content -> contentInfo -> content...
Returns TRUE if content is an Image Asset .
38,743
protected function execute ( InputInterface $ input , OutputInterface $ output ) { $ iterationCount = ( int ) $ input -> getOption ( 'iteration-count' ) ; $ locationsCount = $ this -> repository -> sudo ( function ( Repository $ repository ) { return $ repository -> getLocationService ( ) -> getAllLocationsCount ( ) ; ...
Regenerate URL aliases .
38,744
protected function getProgressBar ( $ maxSteps , OutputInterface $ output ) { $ progressBar = new ProgressBar ( $ output , $ maxSteps ) ; $ progressBar -> setFormat ( ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%' ) ; return $ progressBar ; }
Return configured progress bar helper .
38,745
private function processLocations ( array $ locations , ProgressBar $ progressBar ) { $ contentList = $ this -> repository -> sudo ( function ( Repository $ repository ) use ( $ locations ) { $ contentInfoList = array_map ( function ( Location $ location ) { return $ location -> contentInfo ; } , $ locations ) ; return...
Process single results page of fetched Locations .
38,746
public function getOptions ( Request $ request ) { $ return = array ( ) ; if ( $ request -> attributes -> has ( 'is_rest_request' ) && $ request -> attributes -> get ( 'is_rest_request' ) === true ) { $ return [ 'allow_methods' ] = $ this -> getAllowedMethods ( $ request -> getPathInfo ( ) ) ; } return $ return ; }
Returns allowed CORS methods for a REST route .
38,747
protected function fetchUserId ( $ fieldId ) { $ query = $ this -> dbHandler -> createSelectQuery ( ) ; $ query -> select ( $ this -> dbHandler -> quoteColumn ( 'contentobject_id' ) ) -> from ( $ this -> dbHandler -> quoteTable ( 'ezcontentobject_attribute' ) ) -> where ( $ query -> expr -> eq ( $ this -> dbHandler -> ...
Fetch basic user data .
38,748
protected function doJoin ( $ type , array $ args ) { if ( count ( $ args ) === 0 ) { throw new QueryException ( 'No arguments given' ) ; } $ tableName = $ args [ 0 ] ; $ condition = '' ; if ( count ( $ args ) == 2 ) { $ condition = $ args [ 1 ] ; } elseif ( count ( $ args ) == 3 ) { $ condition = $ args [ 1 ] . ' = ' ...
Helper function to generate join .
38,749
public function resolveArguments ( ReflectionClass $ classReflection , array $ arguments = [ ] ) { $ injArguments = $ this -> parseAnnotations ( $ this -> getMethodAnnotations ( $ classReflection ) ) ; if ( ! empty ( $ injArguments ) ) { $ arguments = [ ] ; foreach ( $ injArguments as $ name => $ service ) { $ argument...
Resolve service arguments for Behat Context constructor thru annotation . Symfony2Extension ArgumentResoler will convert service names to actual instances .
38,750
private function parseAnnotations ( $ annotations ) { $ methodServices = [ ] ; foreach ( $ annotations as $ annotation ) { if ( ! preg_match ( '/^(\w+)\s+\$(\w+)\s+([\w\.\@\%]+)/' , $ annotation , $ matches ) ) { continue ; } array_shift ( $ matches ) ; $ tag = array_shift ( $ matches ) ; if ( $ tag == self :: SERVICE_...
Returns an array with the method arguments service requirements if the methods use the service Annotation .
38,751
public function extractUrlAliasFromData ( $ data ) { $ urlAlias = new UrlAlias ( ) ; list ( $ type , $ destination ) = $ this -> matchTypeAndDestination ( $ data [ 'action' ] ) ; $ urlAlias -> id = $ data [ 'parent' ] . '-' . $ data [ 'text_md5' ] ; $ urlAlias -> pathData = $ this -> normalizePathData ( $ data [ 'raw_p...
Creates a UrlAlias object from database row data .
38,752
public function convertToPOSIX ( $ ezpLocale ) { if ( ! isset ( $ this -> conversionMap [ $ ezpLocale ] ) ) { $ this -> logger -> warning ( "Could not convert locale '$ezpLocale' to POSIX format. Please check your locale configuration in ezplatform.yml" ) ; return ; } return $ this -> conversionMap [ $ ezpLocale ] ; }
Converts a locale in eZ Publish internal format to POSIX format . Returns null if conversion cannot be made .
38,753
public function convertToEz ( $ posixLocale ) { if ( ! isset ( $ this -> reverseConversionMap [ $ posixLocale ] ) ) { $ this -> logger -> warning ( "Could not convert locale '$posixLocale' to eZ Publish format. Please check your locale configuration in ezplatform.yml" ) ; return ; } return $ this -> reverseConversionMa...
Converts a locale in POSIX format to eZ Publish internal format . Returns null if conversion cannot be made .
38,754
public function applySelect ( SelectQuery $ query , array $ sortClauses ) { foreach ( $ sortClauses as $ nr => $ sortClause ) { foreach ( $ this -> handlers as $ handler ) { if ( $ handler -> accept ( $ sortClause ) ) { foreach ( ( array ) $ handler -> applySelect ( $ query , $ sortClause , $ nr ) as $ column ) { if ( ...
Apply select parts of sort clauses to query .
38,755
public function applyJoin ( SelectQuery $ query , array $ sortClauses , array $ languageSettings ) { foreach ( $ sortClauses as $ nr => $ sortClause ) { foreach ( $ this -> handlers as $ handler ) { if ( $ handler -> accept ( $ sortClause ) ) { $ handler -> applyJoin ( $ query , $ sortClause , $ nr , $ languageSettings...
Apply join parts of sort clauses to query .
38,756
public function applyOrderBy ( SelectQuery $ query ) { foreach ( $ this -> sortColumns as $ column => $ direction ) { $ query -> orderBy ( $ column , $ direction === Query :: SORT_ASC ? SelectQuery :: ASC : SelectQuery :: DESC ) ; } $ this -> sortColumns = array ( ) ; }
Apply order by parts of sort clauses to query .
38,757
public function beginTransaction ( ) { $ return = $ this -> repository -> beginTransaction ( ) ; if ( $ this -> signalDispatcher instanceof TransactionHandler ) { $ this -> signalDispatcher -> beginTransaction ( ) ; } return $ return ; }
Begin transaction .
38,758
public function getIndexMetadata ( Document $ document ) { $ metadataHash = array ( 'index' => array ( '_type' => $ document -> type , '_id' => $ document -> id , ) , ) ; return json_encode ( $ metadataHash ) ; }
Returns bulk metadata for creating a new document or replacing an existing document .
38,759
public function parse ( array $ data , ParsingDispatcher $ parsingDispatcher ) { if ( ! array_key_exists ( 'VisibilityCriterion' , $ data ) ) { throw new Exceptions \ Parser ( 'Invalid <VisibilityCriterion> format' ) ; } if ( $ data [ 'VisibilityCriterion' ] != VisibilityCriterion :: VISIBLE && $ data [ 'VisibilityCrit...
Parses input structure to a Visibility Criterion object .
38,760
protected function getForwardRequest ( Location $ location , Content $ content , SiteAccess $ previewSiteAccess , Request $ request , $ language ) { $ forwardRequestParameters = array ( '_controller' => UrlAliasRouter :: VIEW_ACTION , '_route' => UrlAliasGenerator :: INTERNAL_CONTENT_VIEW_ROUTE , '_route_params' => arr...
Returns the Request object that will be forwarded to the kernel for previewing the content .
38,761
public function acceptValue ( APILimitationValue $ limitationValue ) { if ( ! $ limitationValue instanceof APIBlockingLimitation ) { throw new InvalidArgumentType ( '$limitationValue' , 'BlockingLimitation' , $ limitationValue ) ; } elseif ( ! is_array ( $ limitationValue -> limitationValues ) ) { throw new InvalidArgu...
Accepts a Blocking Limitation value and checks for structural validity .
38,762
protected function createFindQuery ( ) : QueryBuilder { $ query = $ this -> connection -> createQueryBuilder ( ) ; $ query -> select ( 'id' , 'locale' , 'name' , 'disabled' ) -> from ( 'ezcontent_language' ) ; return $ query ; }
Creates a Language find query .
38,763
public function canMap ( Field $ field ) { return $ field -> type instanceof FieldType \ MultipleStringField || $ field -> type instanceof FieldType \ TextField || $ field -> type instanceof FieldType \ FullTextField ; }
Check if field can be mapped .
38,764
public function parseString ( $ string ) { $ tokens = $ this -> tokenize ( $ string ) ; $ tokens = array_filter ( $ tokens , function ( $ token ) { return ! ( $ token [ 'type' ] === TransformationProcessor :: T_WHITESPACE || $ token [ 'type' ] === TransformationProcessor :: T_COMMENT ) ; } ) ; $ ast = array ( ) ; $ sec...
Parse the given string into an AST .
38,765
protected function tokenize ( $ string ) { $ string = preg_replace ( '(\\r\\n|\\r)' , "\n" , $ string ) ; $ tokens = array ( ) ; $ line = 1 ; while ( strlen ( $ string ) ) { foreach ( $ this -> tokenSpecifications as $ token => $ regexp ) { if ( ! preg_match ( $ regexp , $ string , $ matches ) ) { continue ; } $ string...
Tokenize transformation input file .
38,766
protected function filterValues ( array $ data ) { foreach ( $ data as $ key => $ value ) { if ( is_int ( $ key ) ) { unset ( $ data [ $ key ] ) ; } } return $ data ; }
Filter out numeric array keys .
38,767
public function getImageFieldTypeProcessor ( RouterInterface $ router ) { $ variationsIdentifiers = array_keys ( $ this -> configResolver -> getParameter ( 'image_variations' ) ) ; sort ( $ variationsIdentifiers ) ; return new FieldTypeProcessor \ ImageProcessor ( sys_get_temp_dir ( ) , $ router , $ variationsIdentifie...
Factory for ezpublish_rest . field_type_processor . ezimage .
38,768
public static function dumpAssets ( Event $ event ) { $ options = self :: getOptions ( $ event ) ; $ consoleDir = static :: getConsoleDir ( $ event , 'install assets' ) ; if ( null === $ consoleDir ) { return ; } $ webDir = $ options [ 'symfony-web-dir' ] ; $ command = 'assetic:dump' ; if ( ! empty ( $ options [ 'ezpub...
Dump minified assets for prod environment under the web root directory .
38,769
public static function dumpAssetsHelpText ( Event $ event ) { $ consoleDir = static :: getConsoleDir ( $ event , 'get console dir for asset dump text' ) ; $ event -> getIO ( ) -> write ( '<info>To dump eZ Publish production assets, which is needed for production environment, execute the following:</info>' ) ; $ event -...
Just dump help text on how to dump assets .
38,770
public function createGroupFromCreateStruct ( GroupCreateStruct $ struct ) { $ group = new Group ( ) ; $ group -> name = $ struct -> name ; $ group -> identifier = $ struct -> identifier ; $ group -> created = $ struct -> created ; $ group -> modified = $ struct -> modified ; $ group -> creatorId = $ struct -> creatorI...
Creates a Group from its create struct .
38,771
public function getContentIds ( array $ remoteIds ) { $ objectRemoteIdMap = [ ] ; if ( ! empty ( $ remoteIds ) ) { $ query = $ this -> connection -> createQueryBuilder ( ) ; $ query -> select ( $ this -> connection -> quoteIdentifier ( 'id' ) , $ this -> connection -> quoteIdentifier ( 'remote_id' ) ) -> from ( 'ezcont...
Return a list of Content ids for a list of remote ids .
38,772
public function getUniqueCounterValue ( $ text , $ isRootLevel = true ) { if ( $ isRootLevel ) { foreach ( $ this -> configuration [ 'reservedNames' ] as $ reservedName ) { if ( strcasecmp ( $ text , $ reservedName ) === 0 ) { return 2 ; } } } return 1 ; }
Returns unique counter number that is appended to the path element in order to make it unique against system reserved names and other entries on the same level .
38,773
protected function getEmptyField ( FieldDefinition $ fieldDefinition , $ languageCode ) { $ fieldType = $ this -> fieldTypeRegistry -> getFieldType ( $ fieldDefinition -> fieldType ) ; return new Field ( array ( 'fieldDefinitionId' => $ fieldDefinition -> id , 'type' => $ fieldDefinition -> fieldType , 'value' => $ fie...
Returns empty Field object for given field definition and language code .
38,774
protected function createNewField ( Field $ field , Content $ content ) { $ field -> versionNo = $ content -> versionInfo -> versionNo ; $ field -> id = $ this -> contentGateway -> insertNewField ( $ content , $ field , $ this -> mapper -> convertToStorageValue ( $ field ) ) ; if ( $ this -> storageHandler -> storeFiel...
Creates a new field in the database .
38,775
protected function updateField ( Field $ field , Content $ content ) { $ this -> contentGateway -> updateField ( $ field , $ this -> mapper -> convertToStorageValue ( $ field ) ) ; if ( $ this -> storageHandler -> storeFieldData ( $ content -> versionInfo , $ field ) === true ) { $ this -> contentGateway -> updateField...
Updates an existing field in the database .
38,776
protected function createExistingFieldInNewVersion ( Field $ field , Content $ content ) { $ originalField = clone $ field ; $ field -> versionNo = $ content -> versionInfo -> versionNo ; $ this -> contentGateway -> insertExistingField ( $ content , $ field , $ this -> mapper -> convertToStorageValue ( $ field ) ) ; if...
Creates an existing field in a new version no new ID is generated .
38,777
protected function updateCopiedField ( Field $ field , Field $ updateField , Field $ originalField , Content $ content ) { $ field -> versionNo = $ content -> versionInfo -> versionNo ; $ field -> value = clone $ updateField -> value ; $ this -> contentGateway -> updateField ( $ field , $ this -> mapper -> convertToSto...
Updates a language copy of a non - translatable field .
38,778
public function deleteTranslationFromContentFields ( $ contentId , array $ versions , $ languageCode ) { foreach ( $ versions as $ versionInfo ) { $ fieldTypeIdsMap = $ this -> contentGateway -> getFieldIdsByType ( $ versionInfo -> contentInfo -> id , $ versionInfo -> versionNo , $ languageCode ) ; foreach ( $ fieldTyp...
Deletes translated fields and their external storage data for the given Content Versions .
38,779
public function update ( $ id , $ name , $ identifier ) { $ this -> sectionGateway -> updateSection ( $ id , $ name , $ identifier ) ; $ section = new Section ( ) ; $ section -> id = $ id ; $ section -> name = $ name ; $ section -> identifier = $ identifier ; return $ section ; }
Update name and identifier of a section .
38,780
public function load ( $ id ) { $ rows = $ this -> sectionGateway -> loadSectionData ( $ id ) ; if ( empty ( $ rows ) ) { throw new NotFound ( 'Section' , $ id ) ; } return $ this -> createSectionFromArray ( reset ( $ rows ) ) ; }
Get section data .
38,781
public function loadByIdentifier ( $ identifier ) { $ rows = $ this -> sectionGateway -> loadSectionDataByIdentifier ( $ identifier ) ; if ( empty ( $ rows ) ) { throw new NotFound ( 'Section' , $ identifier ) ; } return $ this -> createSectionFromArray ( reset ( $ rows ) ) ; }
Get section data by identifier .
38,782
public function delete ( $ id ) { $ contentCount = $ this -> sectionGateway -> countContentObjectsInSection ( $ id ) ; if ( $ contentCount > 0 ) { throw new RuntimeException ( "Section with ID '{$id}' still has content assigned." ) ; } $ this -> sectionGateway -> deleteSection ( $ id ) ; }
Delete a section .
38,783
public function getName ( $ name , $ field = null , $ type = null ) { return implode ( '_' , array_filter ( array ( $ type , $ field , $ name ) ) ) ; }
Get name for document field .
38,784
public function getTypedName ( $ name , FieldType $ type ) { if ( $ name === 'id' ) { return $ name ; } $ typeName = $ type -> type ; if ( isset ( $ this -> fieldNameMapping [ $ typeName ] ) ) { $ typeName = $ this -> fieldNameMapping [ $ typeName ] ; } return $ name . '_' . $ typeName ; }
Map field type .
38,785
public function postMap ( array $ config , ContextualizerInterface $ contextualizer ) { $ container = $ contextualizer -> getContainer ( ) ; foreach ( array_merge ( $ config [ 'siteaccess' ] [ 'list' ] , array_keys ( $ config [ 'siteaccess' ] [ 'groups' ] ) ) as $ scope ) { $ this -> addComplexParametersDependencies ( ...
Post process configuration to add io_root_dir and io_prefix .
38,786
private function isStateGroupUsedForLimitation ( $ stateGroupId , array $ limitationValues ) { $ objectStateHandler = $ this -> persistence -> objectStateHandler ( ) ; $ states = $ objectStateHandler -> loadObjectStates ( $ stateGroupId ) ; foreach ( $ states as $ state ) { if ( in_array ( $ state -> id , $ limitationV...
Checks if the State Group contains at least one State that is used by Limitation .
38,787
private function areObjectStatesMatchingTheLimitation ( array $ objectStateIds , array $ limitationValues ) { foreach ( $ objectStateIds as $ objectStateId ) { if ( ! in_array ( $ objectStateId , $ limitationValues ) ) { return false ; } } return true ; }
Verifies if all the Object States are matching the Limitation Values .
38,788
private function groupLimitationValues ( array $ limitationValues ) { $ objectStateHandler = $ this -> persistence -> objectStateHandler ( ) ; $ stateGroups = $ objectStateHandler -> loadAllGroups ( ) ; $ groupedLimitationValues = [ ] ; foreach ( $ stateGroups as $ stateGroup ) { $ states = $ objectStateHandler -> load...
Groups limitation values by the State Group .
38,789
public function process ( ContainerBuilder $ container ) { if ( ! $ container -> has ( 'ezpublish.core.io.migration.file_lister_registry' ) ) { return ; } $ fileListersTagged = $ container -> findTaggedServiceIds ( 'ezpublish.core.io.migration.file_lister' ) ; $ fileListers = [ ] ; foreach ( $ fileListersTagged as $ id...
Registers the FileListerInterface into the file lister registry .
38,790
public function createContentItem ( $ contentTypeIdentifier , array $ fields ) { $ draft = $ this -> createDraft ( $ contentTypeIdentifier , $ fields ) ; $ this -> currentContent = $ this -> repository -> sudo ( function ( ) use ( $ draft ) { return $ this -> repository -> getContentService ( ) -> publishVersion ( $ dr...
Uses a content type identifier + a hash of fields values to create and publish a content item below the root location .
38,791
public function createDraft ( $ contentTypeIdentifier , array $ fields ) { $ contentService = $ this -> repository -> getContentService ( ) ; $ createStruct = $ contentService -> newContentCreateStruct ( $ this -> repository -> getContentTypeService ( ) -> loadContentTypeByIdentifier ( $ contentTypeIdentifier ) , 'eng-...
Uses a content type identifier + a hash of fields values to create and publish a draft below the root location .
38,792
public function commit ( ) { if ( $ this -> transactionDepth === 0 ) { return ; } -- $ this -> transactionDepth ; if ( $ this -> transactionDepth === 0 ) { foreach ( $ this -> signalsQueue as $ signalsQueue ) { foreach ( $ signalsQueue as $ signal ) { $ this -> signalDispatcher -> emit ( $ signal ) ; } } $ this -> tran...
Captures Commit transaction call and emits queued signals .
38,793
public function rollback ( ) { if ( $ this -> transactionDepth === 0 ) { return ; } -- $ this -> transactionDepth ; unset ( $ this -> signalsQueue [ $ this -> transactionCount ] ) ; -- $ this -> transactionCount ; }
Captures Rollback transaction call .
38,794
public function setConfigResolver ( ConfigResolverInterface $ configResolver ) { $ defaultPage = $ configResolver -> getParameter ( 'default_page' ) ; if ( $ defaultPage !== null ) { $ this -> options [ 'default_target_path' ] = $ defaultPage ; } }
Injects the ConfigResolver to potentially override default_target_path for redirections after authentication success .
38,795
protected function getVisibleOnlySubQuery ( SelectQuery $ query ) { $ subSelect = $ query -> subSelect ( ) ; $ subSelect -> selectDistinct ( 'ezurl_object_link.url_id' ) -> from ( 'ezurl_object_link' ) -> innerJoin ( 'ezcontentobject_attribute' , $ query -> expr -> lAnd ( $ query -> expr -> eq ( 'ezurl_object_link.cont...
Generate query that selects ids of visible URLs .
38,796
public function createNamesQuery ( ) { $ query = $ this -> dbHandler -> createSelectQuery ( ) ; $ query -> select ( $ this -> dbHandler -> aliasedColumn ( $ query , 'contentobject_id' , 'ezcontentobject_name' ) , $ this -> dbHandler -> aliasedColumn ( $ query , 'content_version' , 'ezcontentobject_name' ) , $ this -> d...
Create select query to query content name data .
38,797
public function get ( string $ key ) { if ( $ this -> enabled === false ) { return null ; } $ index = $ this -> cacheIndex [ $ key ] ?? $ key ; if ( ! isset ( $ this -> cache [ $ index ] ) || $ this -> cacheExpiryTime [ $ index ] < microtime ( true ) ) { return null ; } ++ $ this -> cacheAccessCount [ $ index ] ; retur...
Returns a cache objects .
38,798
public function setMulti ( array $ objects , callable $ objectIndexes , string $ listIndex = null ) : void { if ( $ this -> enabled === false || \ count ( $ objects ) >= $ this -> limit / 5 ) { return ; } if ( \ count ( $ this -> cache ) + \ count ( $ objects ) >= $ this -> limit ) { $ this -> vacuum ( ) ; } $ expiryTi...
Set object in in - memory cache .
38,799
public function deleteMulti ( array $ keys ) : void { if ( $ this -> enabled === false ) { return ; } foreach ( $ keys as $ index ) { if ( $ key = $ this -> cacheIndex [ $ index ] ?? null ) { unset ( $ this -> cacheIndex [ $ index ] ) ; } else { $ key = $ index ; } unset ( $ this -> cache [ $ key ] , $ this -> cacheExp...
Removes multiple in - memory cache from the pool .