idx int64 0 60.3k | question stringlengths 92 4.62k | target stringlengths 7 635 |
|---|---|---|
39,200 | public function getCalls ( ) { if ( empty ( $ this -> data [ 'calls' ] ) ) { return [ ] ; } $ calls = $ count = [ ] ; foreach ( $ this -> data [ 'calls' ] as $ hash => $ call ) { list ( $ class , $ method ) = \ explode ( '::' , $ call [ 'method' ] ) ; $ namespace = \ explode ( '\\' , $ class ) ; $ class = \ array_pop (... | Returns all calls . |
39,201 | public function getHandlers ( ) { $ handlers = [ ] ; foreach ( $ this -> data [ 'handlers' ] as $ handler => $ count ) { list ( $ class , $ method ) = explode ( '::' , $ handler ) ; unset ( $ class ) ; $ handlers [ $ method ] = $ method . '(' . $ count . ')' ; } return $ handlers ; } | Returns un cached handlers being loaded . |
39,202 | public function onKernelRequest ( GetResponseEvent $ event ) { if ( ! $ event -> getRequest ( ) -> attributes -> get ( 'is_rest_request' ) ) { return ; } if ( ! $ this -> csrfEnabled ) { return ; } if ( ! $ event -> getRequest ( ) -> getSession ( ) -> isStarted ( ) ) { return ; } if ( $ this -> isMethodSafe ( $ event -... | This method validates CSRF token if CSRF protection is enabled . |
39,203 | protected function checkCsrfToken ( Request $ request ) { if ( ! $ request -> headers -> has ( self :: CSRF_TOKEN_HEADER ) ) { return false ; } return $ this -> csrfTokenManager -> isTokenValid ( new CsrfToken ( $ this -> csrfTokenIntention , $ request -> headers -> get ( self :: CSRF_TOKEN_HEADER ) ) ) ; } | Checks the validity of the request s csrf token header . |
39,204 | protected function getNativeTime ( $ value ) { if ( is_numeric ( $ value ) ) { $ date = new DateTime ( "@{$value}" ) ; } else { try { $ date = new DateTime ( $ value ) ; } catch ( Exception $ e ) { throw new InvalidArgumentException ( 'Invalid date provided: ' . $ value ) ; } } return $ date -> format ( 'Y-m-d\\TH:i:s\... | Map value to a proper Elasticsearch date representation . |
39,205 | public function offsetSet ( $ offset , $ value ) { if ( ! $ value instanceof Author ) { throw new InvalidArgumentType ( '$value' , 'eZ\\Publish\\Core\\FieldType\\Author\\Author' , $ value ) ; } $ aAuthors = $ this -> getArrayCopy ( ) ; parent :: offsetSet ( $ offset , $ value ) ; if ( ! isset ( $ value -> id ) || $ val... | Adds a new author to the collection . |
39,206 | public function removeAuthorsById ( array $ authorIds ) { $ aAuthors = $ this -> getArrayCopy ( ) ; foreach ( $ aAuthors as $ i => $ author ) { if ( in_array ( $ author -> id , $ authorIds ) ) { unset ( $ aAuthors [ $ i ] ) ; } } $ this -> exchangeArray ( $ aAuthors ) ; } | Removes authors from current collection with a list of Ids . |
39,207 | protected function getURIElements ( ) { if ( isset ( $ this -> uriElements ) ) { return $ this -> uriElements ; } elseif ( ! isset ( $ this -> request ) ) { return array ( ) ; } $ elements = array_slice ( explode ( '/' , $ this -> request -> pathinfo ) , 1 , $ this -> elementNumber ) ; foreach ( $ elements as $ element... | Returns URI elements as an array . |
39,208 | public function importSchema ( ) { $ schema = $ this -> schemaBuilder -> buildSchema ( ) ; $ databasePlatform = $ this -> db -> getDatabasePlatform ( ) ; $ queries = array_merge ( $ this -> getDropSqlStatementsForExistingSchema ( $ schema , $ databasePlatform ) , $ schema -> toSql ( $ databasePlatform ) ) ; $ queriesCo... | Import Schema using event - driven Schema Builder API from eZ Systems DoctrineSchema Bundle . |
39,209 | public function createObjectState ( $ objectStateGroupId , Request $ request ) { $ objectStateGroup = $ this -> objectStateService -> loadObjectStateGroup ( $ objectStateGroupId ) ; try { $ createdObjectState = $ this -> objectStateService -> createObjectState ( $ objectStateGroup , $ this -> inputDispatcher -> parse (... | Creates a new object state . |
39,210 | public function loadObjectStates ( $ objectStateGroupId ) { $ objectStateGroup = $ this -> objectStateService -> loadObjectStateGroup ( $ objectStateGroupId ) ; return new Values \ ObjectStateList ( $ this -> objectStateService -> loadObjectStates ( $ objectStateGroup , Language :: ALL ) , $ objectStateGroup -> id ) ; ... | Returns a list of all object states of the given group . |
39,211 | public function deleteObjectStateGroup ( $ objectStateGroupId ) { $ this -> objectStateService -> deleteObjectStateGroup ( $ this -> objectStateService -> loadObjectStateGroup ( $ objectStateGroupId ) ) ; return new Values \ NoContent ( ) ; } | The given object state group including the object states is deleted . |
39,212 | public function deleteObjectState ( $ objectStateId ) { $ this -> objectStateService -> deleteObjectState ( $ this -> objectStateService -> loadObjectState ( $ objectStateId ) ) ; return new Values \ NoContent ( ) ; } | The given object state is deleted . |
39,213 | public function getObjectStatesForContent ( $ contentId ) { $ groups = $ this -> objectStateService -> loadObjectStateGroups ( ) ; $ contentInfo = $ this -> contentService -> loadContentInfo ( $ contentId ) ; $ contentObjectStates = array ( ) ; foreach ( $ groups as $ group ) { try { $ state = $ this -> objectStateServ... | Returns the object states of content . |
39,214 | public function setObjectStatesForContent ( $ contentId , Request $ request ) { $ newObjectStates = $ this -> inputDispatcher -> parse ( new Message ( array ( 'Content-Type' => $ request -> headers -> get ( 'Content-Type' ) ) , $ request -> getContent ( ) ) ) ; $ countByGroups = array ( ) ; foreach ( $ newObjectStates ... | Updates object states of content An object state in the input overrides the state of the object state group . |
39,215 | protected function extractParameters ( DOMElement $ embed , $ tagName ) { if ( ! $ viewType = $ embed -> getAttribute ( 'view' ) ) { $ viewType = $ this -> tagDefaultViewMap [ $ tagName ] ; } $ class = $ embed -> getAttribute ( 'ezxhtml:class' ) ; $ align = $ embed -> getAttribute ( 'ezxhtml:align' ) ; $ linkParameters... | Extracts parameters from embed element . |
39,216 | protected function mapLinkTarget ( $ docbookLinkTarget ) { if ( isset ( $ this -> docbookToHtmlTargetMap [ $ docbookLinkTarget ] ) ) { return $ this -> docbookToHtmlTargetMap [ $ docbookLinkTarget ] ; } return null ; } | Converts Docbook target to HTML target . |
39,217 | public function convert ( DOMDocument $ document ) { $ this -> processTag ( $ document , 'ezembed' , false ) ; $ this -> processTag ( $ document , 'ezembedinline' , true ) ; return $ document ; } | Injects rendered payloads into embed elements . |
39,218 | protected function insertNopEntry ( $ parentId , $ text , $ textMD5 ) { return $ this -> gateway -> insertRow ( array ( 'lang_mask' => 1 , 'action' => 'nop:' , 'parent' => $ parentId , 'text' => $ text , 'text_md5' => $ textMD5 , ) ) ; } | Convenience method for inserting nop type row . |
39,219 | public function removeURLAliases ( array $ urlAliases ) { foreach ( $ urlAliases as $ urlAlias ) { if ( $ urlAlias -> isCustom ) { list ( $ parentId , $ textMD5 ) = explode ( '-' , $ urlAlias -> id ) ; if ( ! $ this -> gateway -> removeCustomAlias ( $ parentId , $ textMD5 ) ) { return false ; } } } return true ; } | Removes url aliases . |
39,220 | public function lookup ( $ url ) { $ urlHashes = array ( ) ; foreach ( explode ( '/' , $ url ) as $ level => $ text ) { $ urlHashes [ $ level ] = $ this -> getHash ( $ text ) ; } $ pathDepth = count ( $ urlHashes ) ; if ( $ pathDepth > self :: MAX_URL_ALIAS_DEPTH_LEVEL ) { throw new InvalidArgumentException ( '$urlHash... | Looks up a url alias for the given url . |
39,221 | public function locationMoved ( $ locationId , $ oldParentId , $ newParentId ) { $ newParentLocationAliasId = $ this -> getRealAliasId ( $ newParentId ) ; $ newLocationAlias = $ this -> gateway -> loadAutogeneratedEntry ( 'eznode:' . $ locationId , $ newParentLocationAliasId ) ; $ oldParentLocationAliasId = $ this -> g... | Notifies the underlying engine that a location has moved . |
39,222 | public function locationCopied ( $ locationId , $ newLocationId , $ newParentId ) { $ newParentAliasId = $ this -> getRealAliasId ( $ newLocationId ) ; $ oldParentAliasId = $ this -> getRealAliasId ( $ locationId ) ; $ actionMap = $ this -> getCopiedLocationsMap ( $ locationId , $ newLocationId ) ; $ this -> copySubtre... | Notifies the underlying engine that a location was copied . |
39,223 | public function locationSwapped ( $ location1Id , $ location1ParentId , $ location2Id , $ location2ParentId ) { $ location1 = new SwappedLocationProperties ( $ location1Id , $ location1ParentId ) ; $ location2 = new SwappedLocationProperties ( $ location2Id , $ location2ParentId ) ; $ location1 -> entries = $ this -> g... | Notify the underlying engine that a Location has been swapped . |
39,224 | private function historizeBeforeSwap ( $ location1Entries , $ location2Entries ) { foreach ( $ location1Entries as $ row ) { $ this -> gateway -> historizeBeforeSwap ( $ row [ 'action' ] , $ row [ 'lang_mask' ] ) ; } foreach ( $ location2Entries as $ row ) { $ this -> gateway -> historizeBeforeSwap ( $ row [ 'action' ]... | Historizes given existing active entries for two swapped Locations . |
39,225 | private function getUrlAliasesForSwappedLocations ( Language $ language , SwappedLocationProperties $ location1 , SwappedLocationProperties $ location2 ) { $ isMainLanguage1 = $ language -> id == $ location1 -> mainLanguageId ; $ isMainLanguage2 = $ language -> id == $ location2 -> mainLanguageId ; $ urlAliases = [ ] ;... | Get in a proper order - to be published - a list of URL aliases for swapped Locations . |
39,226 | protected function copySubtree ( $ actionMap , $ oldParentAliasId , $ newParentAliasId ) { $ rows = $ this -> gateway -> loadAutogeneratedEntries ( $ oldParentAliasId ) ; $ newIdsMap = array ( ) ; foreach ( $ rows as $ row ) { $ oldParentAliasId = $ row [ 'id' ] ; if ( ! isset ( $ newIdsMap [ $ oldParentAliasId ] ) ) {... | Recursively copies aliases from old parent under new parent . |
39,227 | public function locationDeleted ( $ locationId ) { $ action = 'eznode:' . $ locationId ; $ entry = $ this -> gateway -> loadAutogeneratedEntry ( $ action ) ; $ this -> removeSubtree ( $ entry [ 'id' ] , $ action , $ entry [ 'is_original' ] ) ; } | Notifies the underlying engine that a location was deleted or moved to trash . |
39,228 | public function translationRemoved ( array $ locationIds , $ languageCode ) { $ languageId = $ this -> languageHandler -> loadByLanguageCode ( $ languageCode ) -> id ; $ actions = [ ] ; foreach ( $ locationIds as $ locationId ) { $ actions [ ] = 'eznode:' . $ locationId ; } $ this -> gateway -> bulkRemoveTranslation ( ... | Notifies the underlying engine that Locations Content Translation was removed . |
39,229 | protected function initializeContainer ( ) { if ( $ this -> bypassCache ) { $ this -> getContainer ( ) ; return ; } $ this -> prepareDirectory ( $ this -> cacheDir , 'cache' ) ; $ cache = new ConfigCache ( $ this -> cacheDir . '/container/' . $ this -> containerClassName . '.php' , $ this -> debug ) ; if ( ! $ cache ->... | Initializes inner container . |
39,230 | protected function getContainer ( ) { if ( $ this -> innerContainer instanceof ContainerInterface ) { } elseif ( ! is_readable ( $ this -> innerContainer ) ) { throw new RuntimeException ( sprintf ( "Unable to read file %s\n" , $ this -> innerContainer ) ) ; } else { $ installDir = $ this -> installDir ; $ this -> inne... | Returns ContainerBuilder by including the default file containerBuilder . php from settings directory . |
39,231 | public function getUrlIdMap ( array $ urls ) { $ map = array ( ) ; if ( ! empty ( $ urls ) ) { $ q = $ this -> getConnection ( ) -> createSelectQuery ( ) ; $ q -> select ( 'id' , 'url' ) -> from ( self :: URL_TABLE ) -> where ( $ q -> expr -> in ( 'url' , $ urls ) ) ; $ statement = $ q -> prepare ( ) ; $ statement -> e... | Returns a list of URL ids for a list of URLs . |
39,232 | private function setRestDriver ( $ restDriver ) { $ namespace = '\\' . __NAMESPACE__ . '\\RestClient\\' ; $ driver = $ namespace . $ restDriver ; $ parent = $ namespace . 'DriverInterface' ; if ( empty ( $ restDriver ) || ! class_exists ( $ driver ) || ! is_subclass_of ( $ driver , $ parent ) ) { throw new InvalidArgum... | Create and set the REST driver to be used . |
39,233 | private function match ( $ url , SPIUrlWildcard $ wildcard ) { if ( preg_match ( $ this -> compile ( $ wildcard -> sourceUrl ) , $ url , $ match ) ) { return $ this -> substitute ( $ wildcard -> destinationUrl , $ match ) ; } return null ; } | Tests if the given url matches against the given url wildcard . |
39,234 | private function buildUrlWildcardDomainObject ( SPIUrlWildcard $ wildcard ) { return new URLWildcard ( array ( 'id' => $ wildcard -> id , 'destinationUrl' => $ wildcard -> destinationUrl , 'sourceUrl' => $ wildcard -> sourceUrl , 'forward' => $ wildcard -> forward , ) ) ; } | Builds API UrlWildcard object from given SPI UrlWildcard object . |
39,235 | private function fetchRow ( ) { ++ $ this -> cursor ; $ imageId = $ this -> rowReader -> getRow ( ) ; if ( substr ( $ imageId , 0 , strlen ( $ this -> prefix ) ) == $ this -> prefix ) { $ imageId = ltrim ( substr ( $ imageId , strlen ( $ this -> prefix ) ) , '/' ) ; } $ this -> item = $ imageId ; } | Fetches the next item from the resultset moves the cursor forward and removes the prefix from the image id . |
39,236 | public function getURLWildcardService ( ) { if ( $ this -> urlWildcardService !== null ) { return $ this -> urlWildcardService ; } $ this -> urlWildcardService = new URLWildcardService ( $ this , $ this -> persistenceHandler -> urlWildcardHandler ( ) , $ this -> serviceSettings [ 'urlWildcard' ] ) ; return $ this -> ur... | Get URLWildcardService . |
39,237 | public function getURLService ( ) { if ( $ this -> urlService !== null ) { return $ this -> urlService ; } $ this -> urlService = new URLService ( $ this , $ this -> persistenceHandler -> urlHandler ( ) ) ; return $ this -> urlService ; } | Get URLService . |
39,238 | public function getBookmarkService ( ) { if ( $ this -> bookmarkService === null ) { $ this -> bookmarkService = new BookmarkService ( $ this , $ this -> persistenceHandler -> bookmarkHandler ( ) ) ; } return $ this -> bookmarkService ; } | Get BookmarkService . |
39,239 | public function getUserPreferenceService ( ) { if ( $ this -> userPreferenceService === null ) { $ this -> userPreferenceService = new UserPreferenceService ( $ this , $ this -> persistenceHandler -> userPreferenceHandler ( ) ) ; } return $ this -> userPreferenceService ; } | Get UserPreferenceService . |
39,240 | protected function getLimitationService ( ) { if ( $ this -> limitationService !== null ) { return $ this -> limitationService ; } $ this -> limitationService = new Helper \ LimitationService ( $ this -> serviceSettings [ 'role' ] ) ; return $ this -> limitationService ; } | Get LimitationService . |
39,241 | protected function getRoleDomainMapper ( ) { if ( $ this -> roleDomainMapper !== null ) { return $ this -> roleDomainMapper ; } $ this -> roleDomainMapper = new Helper \ RoleDomainMapper ( $ this -> getLimitationService ( ) ) ; return $ this -> roleDomainMapper ; } | Get RoleDomainMapper . |
39,242 | public function getSearchService ( ) { if ( $ this -> searchService !== null ) { return $ this -> searchService ; } $ this -> searchService = new SearchService ( $ this , $ this -> searchHandler , $ this -> getDomainMapper ( ) , $ this -> getPermissionCriterionResolver ( ) , $ this -> backgroundIndexer , $ this -> serv... | Get SearchService . |
39,243 | public function getNameSchemaService ( ) { if ( $ this -> nameSchemaService !== null ) { return $ this -> nameSchemaService ; } $ this -> nameSchemaService = new Helper \ NameSchemaService ( $ this -> persistenceHandler -> contentTypeHandler ( ) , $ this -> getContentTypeDomainMapper ( ) , $ this -> getNameableFieldTyp... | Get NameSchemaResolverService . |
39,244 | protected function getDomainMapper ( ) { if ( $ this -> domainMapper !== null ) { return $ this -> domainMapper ; } $ this -> domainMapper = new Helper \ DomainMapper ( $ this -> persistenceHandler -> contentHandler ( ) , $ this -> persistenceHandler -> locationHandler ( ) , $ this -> persistenceHandler -> contentTypeH... | Get Content Domain Mapper . |
39,245 | protected function getContentTypeDomainMapper ( ) { if ( $ this -> contentTypeDomainMapper !== null ) { return $ this -> contentTypeDomainMapper ; } $ this -> contentTypeDomainMapper = new Helper \ ContentTypeDomainMapper ( $ this -> persistenceHandler -> contentTypeHandler ( ) , $ this -> persistenceHandler -> content... | Get ContentType Domain Mapper . |
39,246 | protected function createSelectQuery ( ) { $ query = $ this -> handler -> createSelectQuery ( ) ; $ query -> select ( $ this -> handler -> quoteColumn ( self :: COLUMN_ID ) , $ this -> handler -> quoteColumn ( self :: COLUMN_URL ) , $ this -> handler -> quoteColumn ( self :: COLUMN_ORIGINAL_URL_MD5 ) , $ this -> handle... | Creates a Url find query . |
39,247 | public function purge ( ) { $ this -> dbHandler -> beginTransaction ( ) ; $ query = $ this -> dbHandler -> createDeleteQuery ( ) ; $ tables = [ 'ezsearch_object_word_link' , 'ezsearch_search_phrase' , 'ezsearch_word' , ] ; foreach ( $ tables as $ tbl ) { $ query -> deleteFrom ( $ tbl ) ; $ stmt = $ query -> prepare ( )... | Remove entire search index . |
39,248 | public function deleteWordsWithoutObjects ( ) { $ query = $ this -> dbHandler -> createDeleteQuery ( ) ; $ query -> deleteFrom ( $ this -> dbHandler -> quoteTable ( 'ezsearch_word' ) ) -> where ( $ query -> expr -> eq ( $ this -> dbHandler -> quoteColumn ( 'object_count' ) , ':c' ) ) ; $ stmt = $ query -> prepare ( ) ;... | Delete words not related to any content object . |
39,249 | public function createField ( $ fieldType , $ name = null , $ required = false ) { $ fieldPosition = $ this -> getActualFieldPosition ( ) ; $ name = ( $ name == null ? $ fieldType : $ name ) ; $ fieldCreateStruct = $ this -> contentTypeService -> newFieldDefinitionCreateStruct ( $ name , $ this -> fieldTypeInternalIden... | Creates a fieldtype ans stores it for later use . |
39,250 | public function addValueConstraint ( $ fieldType , $ value , $ constraint ) { $ validatorName = $ this -> getFieldValidator ( $ fieldType ) ; $ validatorParent = $ validatorName . 'Validator' ; if ( $ this -> fieldConstructionObject [ 'fieldType' ] -> validatorConfiguration == null ) { $ this -> fieldConstructionObject... | Adds a validator to the stored field . |
39,251 | public function setFieldContentState ( $ stateFlag , $ field = null , $ value = null ) { if ( $ stateFlag <= $ this -> fieldConstructionObject [ 'objectState' ] || $ stateFlag < self :: FIELD_TYPE_NOT_CREATED ) { return ; } $ this -> setFieldContentState ( $ stateFlag - 1 , $ field , $ value ) ; switch ( $ stateFlag ) ... | Executes necessary operations to guarantee a given state recursive function that calls it self to make sure prerequisites are met . |
39,252 | private function createAndPublishContent ( $ field , $ value ) { $ languageCode = self :: DEFAULT_LANGUAGE ; $ locationCreateStruct = $ this -> locationService -> newLocationCreateStruct ( '2' ) ; $ contentType = $ this -> fieldConstructionObject [ 'contentType' ] ; $ contentCreateStruct = $ this -> contentService -> n... | Creates and publishes the content with a given field and based on the internal ContentType . |
39,253 | private function associateFieldToContentType ( ) { $ fieldCreateStruct = $ this -> fieldConstructionObject [ 'fieldType' ] ; $ this -> fieldConstructionObject [ 'contentType' ] -> addFieldDefinition ( $ fieldCreateStruct ) ; $ this -> fieldConstructionObject [ 'objectState' ] = self :: FIELD_TYPE_ASSOCIATED ; } | Associates the stored fieldtype to the stored contenttype . |
39,254 | private function publishContentType ( ) { $ contentTypeGroup = $ this -> contentTypeService -> loadContentTypeGroupByIdentifier ( 'Content' ) ; $ contentTypeCreateStruct = $ this -> fieldConstructionObject [ 'contentType' ] ; $ contentTypeDraft = $ this -> contentTypeService -> createContentType ( $ contentTypeCreateSt... | Publishes the stored contenttype . |
39,255 | public static function fromString ( $ path ) { if ( ! file_exists ( $ path ) ) { throw new InvalidArgumentType ( '$path' , 'existing file' , $ path ) ; } return new static ( array ( 'inputUri' => $ path , 'fileName' => basename ( $ path ) , 'fileSize' => filesize ( $ path ) , ) ) ; } | Creates a value only from a file path . |
39,256 | public function loadLocations ( ContentInfo $ contentInfo , Location $ rootLocation = null , array $ prioritizedLanguages = null ) { $ values = $ this -> requestParser -> parse ( 'object' , $ contentInfo -> id ) ; $ response = $ this -> client -> request ( 'GET' , $ this -> requestParser -> generate ( 'objectLocations'... | Loads the locations for the given content object . |
39,257 | public function loadLocationChildren ( Location $ location , $ offset = 0 , $ limit = 25 , array $ prioritizedLanguages = null ) { $ values = $ this -> requestParser -> parse ( 'location' , $ location -> id ) ; $ response = $ this -> client -> request ( 'GET' , $ this -> requestParser -> generate ( 'locationChildren' ,... | Loads children which are readable by the current user of a location object sorted by sortField and sortOrder . |
39,258 | public function load ( $ id ) { $ row = $ this -> gateway -> loadUrlWildcardData ( $ id ) ; if ( empty ( $ row ) ) { throw new NotFoundException ( 'UrlWildcard' , $ id ) ; } return $ this -> mapper -> extractUrlWildcardFromRow ( $ row ) ; } | Loads a url wild card . |
39,259 | protected function getFieldNames ( Criterion $ criterion , $ fieldDefinitionIdentifier , $ fieldTypeIdentifier = null , $ name = null ) { return $ this -> fieldNameResolver -> getFieldNames ( $ criterion , $ fieldDefinitionIdentifier , $ fieldTypeIdentifier , $ name ) ; } | Get field names . |
39,260 | public function parse ( array $ data , ParsingDispatcher $ parsingDispatcher ) { if ( ! array_key_exists ( 'SectionIdentifierCriterion' , $ data ) ) { throw new Exceptions \ Parser ( 'Invalid <SectionIdentifierCriterion> format' ) ; } $ section = $ this -> sectionService -> loadSectionByIdentifier ( $ data [ 'SectionId... | Parses input structure to a SectionIdentifier Criterion object . |
39,261 | public function loadVersionInfo ( ContentInfo $ contentInfo , $ versionNo = null ) { return $ this -> loadVersionInfoById ( $ contentInfo -> id , $ versionNo ) ; } | Loads a version info of the given content object . |
39,262 | public function loadVersionInfoById ( $ contentId , $ versionNo = null ) { if ( $ versionNo === null ) { $ versionNo = $ this -> loadContentInfo ( $ contentId ) -> currentVersionNo ; } try { $ spiVersionInfo = $ this -> persistenceHandler -> contentHandler ( ) -> loadVersionInfo ( $ contentId , $ versionNo ) ; } catch ... | Loads a version info of the given content object id . |
39,263 | public function loadContentListByContentInfo ( array $ contentInfoList , array $ languages = [ ] , $ useAlwaysAvailable = true ) { $ loadAllLanguages = $ languages === Language :: ALL ; $ contentIds = [ ] ; $ contentTypeIds = [ ] ; $ translations = $ languages ; foreach ( $ contentInfoList as $ contentInfo ) { $ conten... | Bulk - load Content items by the list of ContentInfo Value Objects . |
39,264 | protected function publishUrlAliasesForContent ( APIContent $ content , $ updatePathIdentificationString = true ) { $ urlAliasNames = $ this -> nameSchemaService -> resolveUrlAliasSchema ( $ content ) ; $ locations = $ this -> repository -> getLocationService ( ) -> loadLocations ( $ content -> getVersionInfo ( ) -> ge... | Publishes URL aliases for all locations of a given content . |
39,265 | public function loadContentDrafts ( User $ user = null ) { if ( $ user === null ) { $ user = $ this -> repository -> getCurrentUserReference ( ) ; } if ( $ this -> repository -> hasAccess ( 'content' , 'versionread' ) === false ) { throw new UnauthorizedException ( 'content' , 'versionread' ) ; } $ spiVersionInfoList =... | Loads drafts for a user . |
39,266 | private function getUpdatedLanguageCodes ( APIContentUpdateStruct $ contentUpdateStruct ) { $ languageCodes = [ $ contentUpdateStruct -> initialLanguageCode => true , ] ; foreach ( $ contentUpdateStruct -> fields as $ field ) { if ( $ field -> languageCode === null || isset ( $ languageCodes [ $ field -> languageCode ]... | Returns only updated language codes . |
39,267 | public function loadVersions ( ContentInfo $ contentInfo ) { if ( ! $ this -> repository -> canUser ( 'content' , 'versionread' , $ contentInfo ) ) { throw new UnauthorizedException ( 'content' , 'versionread' , array ( 'contentId' => $ contentInfo -> id ) ) ; } $ spiVersionInfoList = $ this -> persistenceHandler -> co... | Loads all versions for the given content . |
39,268 | public function loadRelations ( APIVersionInfo $ versionInfo ) { if ( $ versionInfo -> isPublished ( ) ) { $ function = 'read' ; } else { $ function = 'versionread' ; } if ( ! $ this -> repository -> canUser ( 'content' , $ function , $ versionInfo ) ) { throw new UnauthorizedException ( 'content' , $ function ) ; } $ ... | Loads all outgoing relations for the given version . |
39,269 | public function loadReverseRelations ( ContentInfo $ contentInfo ) { if ( ! $ this -> repository -> canUser ( 'content' , 'reverserelatedlist' , $ contentInfo ) ) { throw new UnauthorizedException ( 'content' , 'reverserelatedlist' , array ( 'contentId' => $ contentInfo -> id ) ) ; } $ spiRelations = $ this -> persiste... | Loads all incoming relations for a content object . |
39,270 | public function deleteTranslationFromDraft ( APIVersionInfo $ versionInfo , $ languageCode ) { if ( ! $ versionInfo -> isDraft ( ) ) { throw new BadStateException ( '$versionInfo' , 'Version is not a draft, so Translations cannot be modified. Create a Draft before proceeding' ) ; } if ( $ versionInfo -> contentInfo -> ... | Delete specified Translation from a Content Draft . |
39,271 | public function updateUserToken ( UserTokenUpdateStruct $ userTokenUpdateStruct ) { $ query = $ this -> handler -> createSelectQuery ( ) ; $ query -> select ( $ this -> handler -> quoteColumn ( 'id' , 'ezuser_accountkey' ) ) -> from ( $ this -> handler -> quoteTable ( 'ezuser_accountkey' ) ) -> where ( $ query -> expr ... | Update or insert the user token information specified by the user token struct . |
39,272 | public function restoreConfigScope ( ) { $ event = new ScopeChangeEvent ( $ this -> originalSiteAccess ) ; $ this -> eventDispatcher -> dispatch ( MVCEvents :: CONFIG_SCOPE_RESTORE , $ event ) ; return $ event -> getSiteAccess ( ) ; } | Restores original config scope . |
39,273 | protected function getXSLTProcessor ( ) { if ( isset ( $ this -> xsltProcessor ) ) { return $ this -> xsltProcessor ; } $ xslDoc = $ this -> loadFile ( $ this -> stylesheet ) ; $ insertBeforeEl = $ xslDoc -> documentElement -> firstChild ; foreach ( $ this -> getSortedCustomStylesheets ( ) as $ stylesheet ) { if ( ! fi... | Returns the XSLTProcessor to use to transform internal XML to HTML5 . |
39,274 | protected function getSortedCustomStylesheets ( ) { $ sortedStylesheets = array ( ) ; ksort ( $ this -> customStylesheets ) ; foreach ( $ this -> customStylesheets as $ stylesheets ) { $ sortedStylesheets = array_merge ( $ sortedStylesheets , $ stylesheets ) ; } return $ sortedStylesheets ; } | Returns custom stylesheets to load sorted . The order is from the lowest priority to the highest since in case of a conflict the last loaded XSL template always wins . |
39,275 | protected function generateNullValue ( \ XmlWriter $ writer , $ key = null , $ elementName = 'value' ) { $ writer -> startElement ( $ elementName ) ; $ this -> generateKeyAttribute ( $ writer , $ key ) ; $ writer -> endElement ( ) ; } | Generates a null value . |
39,276 | protected function generateBooleanValue ( \ XmlWriter $ writer , $ value , $ key = null , $ elementName = 'value' ) { $ writer -> startElement ( $ elementName ) ; $ this -> generateKeyAttribute ( $ writer , $ key ) ; $ writer -> text ( $ value ? 'true' : 'false' ) ; $ writer -> endElement ( ) ; } | Generates a boolean value . |
39,277 | protected function generateFloatValue ( \ XmlWriter $ writer , $ value , $ key = null , $ elementName = 'value' ) { $ writer -> startElement ( $ elementName ) ; $ this -> generateKeyAttribute ( $ writer , $ key ) ; $ writer -> text ( sprintf ( '%F' , $ value ) ) ; $ writer -> endElement ( ) ; } | Generates a float value . |
39,278 | public function parse ( array $ data , ParsingDispatcher $ parsingDispatcher ) { if ( ! isset ( $ data [ 'Field' ] ) ) { throw new Exceptions \ Parser ( "The <Field> sort clause doesn't exist in the input structure" ) ; } if ( ! is_array ( $ data [ 'Field' ] ) ) { throw new Exceptions \ Parser ( 'The <Field> sort claus... | Parse input structure for Field sort clause . |
39,279 | public function getSlice ( $ offset , $ length ) { $ list = array ( ) ; foreach ( parent :: getSlice ( $ offset , $ length ) as $ hit ) { $ list [ ] = $ hit -> valueObject ; } return $ list ; } | Returns a slice of the results as Location objects . |
39,280 | public function getTranslatedFieldDefinitionProperty ( ContentType $ contentType , $ fieldDefIdentifier , $ property = 'name' , $ forcedLanguage = null ) { $ fieldDefinition = $ contentType -> getFieldDefinition ( $ fieldDefIdentifier ) ; if ( ! $ fieldDefinition instanceof FieldDefinition ) { throw new InvalidArgument... | Returns Field definition name in the appropriate language for a given content . |
39,281 | public function getTranslatedByMethod ( ValueObject $ object , $ method , $ forcedLanguage = null ) { if ( ! method_exists ( $ object , $ method ) ) { throw new InvalidArgumentException ( '$method' , "Method '{$method}' not found on " . get_class ( $ object ) ) ; } foreach ( $ this -> getLanguages ( $ forcedLanguage ) ... | Gets translated method generic helper . |
39,282 | public function getAvailableLanguages ( ) { $ translationSiteAccesses = $ this -> configResolver -> getParameter ( 'translation_siteaccesses' ) ; $ relatedSiteAccesses = $ translationSiteAccesses ? : $ this -> configResolver -> getParameter ( 'related_siteaccesses' ) ; $ availableLanguages = array ( ) ; $ currentLangua... | Returns the list of all available languages including the ones configured in related SiteAccesses . |
39,283 | public function store ( BinaryInterface $ binary , $ path , $ filter ) { $ tmpFile = tmpfile ( ) ; fwrite ( $ tmpFile , $ binary -> getContent ( ) ) ; $ tmpMetadata = stream_get_meta_data ( $ tmpFile ) ; $ binaryCreateStruct = $ this -> ioService -> newBinaryCreateStructFromLocalFile ( $ tmpMetadata [ 'uri' ] ) ; $ bin... | Stores image alias in the IO Repository . A temporary file is created to dump the filtered image and is used as basis for creation in the IO Repository . |
39,284 | protected function getBaseUrl ( ) { $ port = '' ; if ( $ this -> requestContext -> getScheme ( ) === 'https' && $ this -> requestContext -> getHttpsPort ( ) != 443 ) { $ port = ":{$this->requestContext->getHttpsPort()}" ; } if ( $ this -> requestContext -> getScheme ( ) === 'http' && $ this -> requestContext -> getHttp... | Returns base URL with scheme host and port for current request context . If no delivery URL is configured for current SiteAccess will return base URL from current RequestContext . |
39,285 | public function loadUserGroup ( $ id , array $ prioritizedLanguages = [ ] ) { $ content = $ this -> repository -> getContentService ( ) -> loadContent ( $ id , $ prioritizedLanguages ) ; return $ this -> buildDomainUserGroupObject ( $ content ) ; } | Loads a user group for the given id . |
39,286 | public function loadUser ( $ userId , array $ prioritizedLanguages = [ ] ) { $ content = $ this -> repository -> getContentService ( ) -> internalLoadContent ( $ userId , $ prioritizedLanguages ) ; foreach ( $ content -> getFields ( ) as $ field ) { if ( ! $ field -> value instanceof UserValue ) { continue ; } $ value ... | Loads a user . |
39,287 | private function updatePasswordHash ( $ login , $ password , SPIUser $ spiUser ) { if ( $ spiUser -> hashAlgorithm === $ this -> settings [ 'hashType' ] ) { return ; } $ spiUser -> passwordHash = $ this -> createPasswordHash ( $ login , $ password , null , $ this -> settings [ 'hashType' ] ) ; $ spiUser -> hashAlgorith... | Update password hash to the type configured for the service if they differ . |
39,288 | public function loadUserByLogin ( $ login , array $ prioritizedLanguages = [ ] ) { if ( ! is_string ( $ login ) || empty ( $ login ) ) { throw new InvalidArgumentValue ( 'login' , $ login ) ; } $ spiUser = $ this -> userHandler -> loadByLogin ( $ login ) ; return $ this -> buildDomainUserObject ( $ spiUser , null , $ p... | Loads a user for the given login . |
39,289 | public function loadUsersByEmail ( $ email , array $ prioritizedLanguages = [ ] ) { if ( ! is_string ( $ email ) || empty ( $ email ) ) { throw new InvalidArgumentValue ( 'email' , $ email ) ; } $ users = array ( ) ; foreach ( $ this -> userHandler -> loadByEmail ( $ email ) as $ spiUser ) { $ users [ ] = $ this -> bui... | Loads a user for the given email . |
39,290 | public function loadUserByToken ( $ hash , array $ prioritizedLanguages = [ ] ) { if ( ! is_string ( $ hash ) || empty ( $ hash ) ) { throw new InvalidArgumentValue ( 'hash' , $ hash ) ; } $ spiUser = $ this -> userHandler -> loadUserByToken ( $ hash ) ; return $ this -> buildDomainUserObject ( $ spiUser , null , $ pri... | Loads a user for the given token . |
39,291 | public function newUserCreateStruct ( $ login , $ email , $ password , $ mainLanguageCode , $ contentType = null ) { if ( $ contentType === null ) { $ contentType = $ this -> repository -> getContentTypeService ( ) -> loadContentType ( $ this -> settings [ 'userClassID' ] ) ; } return new UserCreateStruct ( array ( 'co... | Instantiate a user create class . |
39,292 | public function newUserGroupCreateStruct ( $ mainLanguageCode , $ contentType = null ) { if ( $ contentType === null ) { $ contentType = $ this -> repository -> getContentTypeService ( ) -> loadContentType ( $ this -> settings [ 'userGroupClassID' ] ) ; } return new UserGroupCreateStruct ( array ( 'contentType' => $ co... | Instantiate a user group create class . |
39,293 | protected function buildDomainUserGroupObject ( APIContent $ content ) { $ locationService = $ this -> repository -> getLocationService ( ) ; if ( $ content -> getVersionInfo ( ) -> getContentInfo ( ) -> mainLocationId !== null ) { $ mainLocation = $ locationService -> loadLocation ( $ content -> getVersionInfo ( ) -> ... | Builds the domain UserGroup object from provided Content object . |
39,294 | protected function buildDomainUserObject ( SPIUser $ spiUser , APIContent $ content = null , array $ prioritizedLanguages = [ ] ) { if ( $ content === null ) { $ content = $ this -> repository -> getContentService ( ) -> internalLoadContent ( $ spiUser -> id , $ prioritizedLanguages ) ; } return new User ( array ( 'con... | Builds the domain user object from provided persistence user object . |
39,295 | protected function verifyPassword ( $ login , $ password , $ spiUser ) { if ( $ spiUser -> hashAlgorithm === APIUser :: PASSWORD_HASH_BCRYPT || $ spiUser -> hashAlgorithm === APIUser :: PASSWORD_HASH_PHP_DEFAULT ) { return password_verify ( $ password , $ spiUser -> passwordHash ) ; } usleep ( random_int ( 0 , 30000 ) ... | Verifies if the provided login and password are valid . |
39,296 | protected function createPasswordHash ( $ login , $ password , $ site , $ type ) { $ deprecationWarningFormat = 'Password hash type %s is deprecated since 6.13.' ; switch ( $ type ) { case APIUser :: PASSWORD_HASH_MD5_PASSWORD : @ trigger_error ( sprintf ( $ deprecationWarningFormat , 'PASSWORD_HASH_MD5_PASSWORD' ) , E... | Returns password hash based on user data and site settings . |
39,297 | public function getIOService ( ) { if ( null === $ this -> ioService ) { $ this -> ioService = new IOService ( $ this -> client , $ this -> inputDispatcher , $ this -> outputVisitor , $ this -> requestParser ) ; } return $ this -> ioService ; } | Get IO Service . |
39,298 | private function resolveNamespace ( RequestStack $ requestStack = null ) { if ( $ requestStack !== null && ( $ request = $ requestStack -> getMasterRequest ( ) ) ) { return $ request -> isSecure ( ) ? 'https-' : '' ; } return ! empty ( $ _SERVER [ 'HTTPS' ] ) && 'off' !== strtolower ( $ _SERVER [ 'HTTPS' ] ) ? 'https-'... | Resolves token namespace . |
39,299 | private function resetDynamicSettings ( ) { foreach ( $ this -> resettableServiceIds as $ serviceId ) { if ( ! $ this -> container -> initialized ( $ serviceId ) ) { continue ; } $ this -> container -> set ( $ serviceId , null ) ; } foreach ( $ this -> updatableServices as $ serviceId => $ methodCalls ) { if ( ! $ this... | Ensure that dynamic settings are correctly reset so that services that rely on those are correctly updated . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.