idx
int64
0
241k
question
stringlengths
64
6.21k
target
stringlengths
5
803
17,300
public function compile ( $ stub , $ modelName , $ modelData , stdClass $ scaffolderConfig , $ hash , ScaffolderThemeExtensionInterface $ themeExtension , array $ extensions , $ extra = null ) { $ this -> stub = $ stub ; return $ this -> store ( null , $ scaffolderConfig , $ themeExtension -> runAfterEditLayoutIsCompil...
Compiles the edit layout .
17,301
public function populate ( int $ deep = 0 ) { $ nb_catalog = $ this -> getCatalog ( ) ; $ this -> clear ( ) ; $ this -> merge ( CNabuCatalogItem :: getItemsForCatalog ( $ nb_catalog , $ deep ) ) ; $ translations = CNabuCatalogItem :: getItemTranslationsForCatalog ( $ nb_catalog , $ deep ) ; $ translations -> iterate ( ...
Populates the catalog with all Items .
17,302
public function getDescriptor ( $ force = false ) { if ( ! ( $ this -> storage_descriptor instanceof INabuDBDescriptor ) || $ force ) { $ this -> storage_descriptor = null ; $ this -> storage_descriptor = $ this -> db -> getDescriptorFromFile ( $ this -> getStorageDescriptorPath ( ) ) ; } return $ this -> storage_descr...
Gets the Storage Descriptor . When calls this method the first time an internal INabuDBDescriptor object is created and returned next times .
17,303
public function refresh ( bool $ force = false , bool $ cascade = false ) : bool { $ this -> relinkDB ( ) ; return $ this -> load ( ) ; }
Refresh data from the database storage .
17,304
public static function findByKey ( $ nb_site , $ key ) { $ nb_site_id = nb_getMixedValue ( $ nb_site , 'nb_site_id' ) ; if ( is_numeric ( $ nb_site_id ) ) { $ retval = CNabuSiteTarget :: buildObjectFromSQL ( 'select * ' . 'from nb_site_target ' . 'where nb_site_id=%site_id$d ' . "and nb_site_target_key='%key\$s'" , arr...
Find an instance identified by nb_site_target_key field .
17,305
public static function getAllSiteTargets ( CNabuSite $ nb_site ) { $ nb_site_id = nb_getMixedValue ( $ nb_site , 'nb_site_id' ) ; if ( is_numeric ( $ nb_site_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_site_target_id' , 'select * ' . 'from nb_site_target ' ....
Get all items in the storage as an associative array where the field nb_site_target_id is the index and each value is an instance of class CNabuSiteTargetBase .
17,306
public function setUseHTTP ( string $ use_http = "F" ) : CNabuDataObject { if ( $ use_http === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_http" ) ) ; } $ this -> setValue ( 'nb_site_target_use_http' , $ use_http ) ; return $ this ; }
Sets the Site Target Use HTTP attribute value .
17,307
public function setUseHTTPS ( string $ use_https = "F" ) : CNabuDataObject { if ( $ use_https === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_https" ) ) ; } $ this -> setValue ( 'nb_site_target_use_https' , $ use_https ) ; return $ this ; }
Sets the Site Target Use HTTPS attribute value .
17,308
public function setAttachment ( string $ attachment = "F" ) : CNabuDataObject { if ( $ attachment === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$attachment" ) ) ; } $ this -> setValue ( 'nb_site_target_attachment' , $ attachment ) ; return $ this ; }
Sets the Site Target Attachment attribute value .
17,309
public function setSmartyDebugging ( string $ smarty_debugging = "F" ) : CNabuDataObject { if ( $ smarty_debugging === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$smarty_debugging" ) ) ; } $ this -> setValue ( 'nb_site_target_smarty_debugging' , $ smarty_de...
Sets the Site Target Smarty Debugging attribute value .
17,310
public function setPHPTrace ( string $ php_trace = "F" ) : CNabuDataObject { if ( $ php_trace === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$php_trace" ) ) ; } $ this -> setValue ( 'nb_site_target_php_trace' , $ php_trace ) ; return $ this ; }
Sets the Site Target PHP Trace attribute value .
17,311
public function setIgnorePolicies ( string $ ignore_policies = "F" ) : CNabuDataObject { if ( $ ignore_policies === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$ignore_policies" ) ) ; } $ this -> setValue ( 'nb_site_target_ignore_policies' , $ ignore_policie...
Sets the Site Target Ignore Policies attribute value .
17,312
public function setUseCommerce ( string $ use_commerce = "F" ) : CNabuDataObject { if ( $ use_commerce === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_commerce" ) ) ; } $ this -> setValue ( 'nb_site_target_use_commerce' , $ use_commerce ) ; return $ thi...
Sets the Site Target Use Commerce attribute value .
17,313
public function setUseApps ( string $ use_apps = "F" ) : CNabuDataObject { if ( $ use_apps === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$use_apps" ) ) ; } $ this -> setValue ( 'nb_site_target_use_apps' , $ use_apps ) ; return $ this ; }
Sets the Site Target Use Apps attribute value .
17,314
public function setDynamicCacheControl ( string $ dynamic_cache_control = "S" ) : CNabuDataObject { if ( $ dynamic_cache_control === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$dynamic_cache_control" ) ) ; } $ this -> setValue ( 'nb_site_target_dynamic_cach...
Sets the Site Target Dynamic Cache Control attribute value .
17,315
public function getActiveServices ( bool $ force = false ) : CNabuMessagingServiceList { if ( $ this -> nb_messaging_service_list -> isEmpty ( ) || $ force ) { $ this -> nb_messaging_service_list -> clear ( ) ; if ( ( $ nb_messaging = $ this -> getMessaging ( ) ) instanceof CNabuMessaging && ! ( $ nb_services_list = $ ...
Get the list of active Service instances connected to this Template .
17,316
public static function getAllMessagingServiceStacks ( CNabuMessaging $ nb_messaging ) { $ nb_messaging_id = nb_getMixedValue ( $ nb_messaging , 'nb_messaging_id' ) ; if ( is_numeric ( $ nb_messaging_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_messaging_servi...
Get all items in the storage as an associative array where the field nb_messaging_service_stack_id is the index and each value is an instance of class CNabuMessagingServiceStackBase .
17,317
public function setMessagingId ( int $ nb_messaging_id ) : CNabuDataObject { if ( $ nb_messaging_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_messaging_id" ) ) ; } $ this -> setValue ( 'nb_messaging_id' , $ nb_messaging_id ) ; return $ this ; }
Sets the Messaging Id attribute value .
17,318
public function setMessagingServiceId ( int $ nb_messaging_service_id ) : CNabuDataObject { if ( $ nb_messaging_service_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_messaging_service_id" ) ) ; } $ this -> setValue ( 'nb_messaging_service_id' , $ nb...
Sets the Messaging Service Id attribute value .
17,319
public function setMessagingTemplateId ( int $ nb_messaging_template_id ) : CNabuDataObject { if ( $ nb_messaging_template_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_messaging_template_id" ) ) ; } $ this -> setValue ( 'nb_messaging_template_id' ,...
Sets the Messaging Template Id attribute value .
17,320
public static function getAllProjectVersions ( CNabuProject $ nb_project ) { $ nb_project_id = nb_getMixedValue ( $ nb_project , 'nb_project_id' ) ; if ( is_numeric ( $ nb_project_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_project_version_id' , 'select * ' ...
Get all items in the storage as an associative array where the field nb_project_version_id is the index and each value is an instance of class CNabuProjectVersionBase .
17,321
public static function getFilteredProjectVersionList ( $ nb_project = null , $ q = null , $ fields = null , $ order = null , $ offset = 0 , $ num_items = 0 ) { $ nb_project_id = nb_getMixedValue ( $ nb_customer , NABU_PROJECT_FIELD_ID ) ; if ( is_numeric ( $ nb_project_id ) ) { $ fields_part = nb_prefixFieldList ( CNab...
Gets a filtered list of Project Version instances represented as an array . Params allows the capability of select a subset of fields order by concrete fields or truncate the list by a number of rows starting in an offset .
17,322
public function setProjectId ( int $ nb_project_id ) : CNabuDataObject { if ( $ nb_project_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_project_id" ) ) ; } $ this -> setValue ( 'nb_project_id' , $ nb_project_id ) ; return $ this ; }
Sets the Project Id attribute value .
17,323
public static function hydrateCollection ( array $ logs ) { $ hydrated = [ ] ; foreach ( $ logs as $ log ) { $ hydrated [ ] = self :: hydrate ( $ log ) ; } return $ hydrated ; }
Hydrate a collection of log objects into a collection of LogEntity objects
17,324
public static function hydrate ( stdClass $ log ) { $ hydrated = new LogEntity ( ) ; if ( isset ( $ log -> id ) ) { $ hydrated -> setId ( $ log -> id ) ; } if ( isset ( $ log -> text ) ) { $ hydrated -> setText ( $ log -> text ) ; } if ( isset ( $ log -> level ) ) { $ hydrated -> setLevel ( $ log -> level ) ; } if ( is...
Hydrate a log object into a LogEntity object
17,325
public static function hydrateCollection ( array $ parts ) { $ hydrated = [ ] ; foreach ( $ parts as $ part ) { $ hydrated [ ] = self :: hydrate ( $ part ) ; } return $ hydrated ; }
Hydrate a collection of part objects into a collection of PartEntity objects
17,326
public static function hydrate ( stdClass $ part ) { $ hydrated = new PartEntity ( ) ; if ( isset ( $ part -> id ) ) { $ hydrated -> setId ( $ part -> id ) ; } if ( isset ( $ part -> type ) ) { $ hydrated -> setType ( $ part -> type ) ; } if ( isset ( $ part -> content ) ) { $ hydrated -> setContent ( $ part -> content...
Hydrate a part object into a PartEntity object
17,327
public function insert ( $ entity ) { $ eloquentModel = $ this -> getEloquentModel ( $ entity ) ; $ this -> updateRelations ( $ eloquentModel , 'insert' ) ; $ eloquentModel -> save ( ) ; $ eloquentModel -> afterSaving ( $ entity , 'insert' ) ; }
Create an entity object .
17,328
public function update ( $ entity ) { $ eloquentModel = $ this -> getEloquentModel ( $ entity , true ) ; $ this -> updateRelations ( $ eloquentModel , 'update' ) ; $ eloquentModel -> save ( ) ; $ eloquentModel -> afterSaving ( $ entity , 'update' ) ; }
Update an entity object .
17,329
protected function updateRelations ( $ eloquentModel , $ action ) { $ mapping = $ eloquentModel -> getMapping ( ) ; $ eloquentRelations = $ eloquentModel -> getRelations ( ) ; foreach ( $ mapping [ 'relations' ] as $ name => $ relationMapping ) { if ( isset ( $ eloquentRelations [ $ name ] ) ) { $ this -> updateRelatio...
Update relations .
17,330
protected function updateRelation ( $ eloquentModel , $ name , $ relationMapping , $ action ) { if ( $ relationMapping [ 'type' ] == 'belongsTo' || $ relationMapping [ 'type' ] == 'morphTo' ) { $ this -> updateBelongsToRelation ( $ eloquentModel , $ name , $ action ) ; } if ( ( $ relationMapping [ 'type' ] == 'belongsT...
Update a relation .
17,331
protected function updateBelongsToRelation ( $ eloquentModel , $ name , $ action ) { if ( $ action == 'insert' || $ action == 'update' ) { $ eloquentModel -> { $ name } ( ) -> associate ( $ eloquentModel -> getRelation ( $ name ) ) ; } }
Update a belongsTo or morphTo relation .
17,332
protected function updateBelongsToManyRelation ( $ eloquentModel , $ name , $ action ) { $ eloquentCollection = $ eloquentModel -> getRelation ( $ name ) ; if ( ! $ eloquentCollection instanceof \ Illuminate \ Database \ Eloquent \ Collection ) { throw new Exception ( "Many-to-many relation '" . $ name . "' is not a va...
Update a belongsToMany or morphToMany relation .
17,333
public function getAll ( $ appId , $ scanId , $ issueId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> contexts ( ) -> getAll ( $ appId , $ scanId , $ issueId , $ queryParams ) ; return new ContextsResponse ( $ response ) ; }
Get all contexts for an issue
17,334
public function getById ( $ appId , $ scanId , $ issueId , $ contextId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> contexts ( ) -> getById ( $ appId , $ scanId , $ issueId , $ contextId , $ queryParams ) ; return new ContextResponse ( $ response ) ; }
Get context for an issue by id
17,335
protected function getResults ( $ method ) { if ( $ this -> schema ) { if ( isset ( $ this -> constraints [ $ this -> root ] ) ) { $ this -> constraints [ $ this -> root ] ( $ this -> eloquentQuery ) ; } $ this -> eloquentQuery -> setEagerLoads ( $ this -> parseRelationsFromSchema ( $ this -> schema , '' ) ) ; $ result...
Prepare query for execution .
17,336
protected function parseRelationsFromSchema ( array $ schema , $ path = '' ) { $ results = [ ] ; foreach ( $ schema as $ key => $ value ) { if ( ! is_numeric ( $ key ) ) { if ( substr ( $ key , 0 , 3 ) != '...' ) { $ childPath = ( $ path ) ? $ path . '.' . $ key : $ key ; $ results [ $ childPath ] = ( isset ( $ this ->...
Parse relations from schema .
17,337
public function schema ( array $ schema ) { $ this -> root = key ( $ schema ) ; $ this -> schema = current ( $ schema ) ; return $ this ; }
Set the schema .
17,338
public static function hydrateCollection ( array $ resources ) { $ hydrated = [ ] ; foreach ( $ resources as $ resource ) { $ hydrated [ ] = self :: hydrate ( $ resource ) ; } return $ hydrated ; }
Hydrate a collection of resource objects into a collection of ResourceEntity objects
17,339
public static function hydrate ( stdClass $ resource ) { $ hydrated = new ResourceEntity ( ) ; if ( isset ( $ resource -> id ) ) { $ hydrated -> setId ( $ resource -> id ) ; } if ( isset ( $ resource -> title ) ) { $ hydrated -> setTitle ( $ resource -> title ) ; } if ( isset ( $ resource -> author ) ) { $ hydrated -> ...
Hydrate a resource object into a ResourceEntity object
17,340
public static function getAllSiteAliass ( CNabuSite $ nb_site ) { $ nb_site_id = nb_getMixedValue ( $ nb_site , 'nb_site_id' ) ; if ( is_numeric ( $ nb_site_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_site_alias_id' , 'select * ' . 'from nb_site_alias ' . 'w...
Get all items in the storage as an associative array where the field nb_site_alias_id is the index and each value is an instance of class CNabuSiteAliasBase .
17,341
public function setDomainZoneHostId ( int $ nb_domain_zone_host_id ) : CNabuDataObject { if ( $ nb_domain_zone_host_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_domain_zone_host_id" ) ) ; } $ this -> setValue ( 'nb_domain_zone_host_id' , $ nb_domai...
Sets the Domain Zone Host Id attribute value .
17,342
public function setType ( string $ type = "F" ) : CNabuDataObject { if ( $ type === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$type" ) ) ; } $ this -> setValue ( 'nb_site_alias_type' , $ type ) ; return $ this ; }
Sets the Site Alias Type attribute value .
17,343
public static function hydrateCollection ( array $ types ) { $ hydrated = [ ] ; foreach ( $ types as $ type ) { $ hydrated [ ] = self :: hydrate ( $ type ) ; } return $ hydrated ; }
Hydrate a collection of type objects into a collection of TypeEntity objects
17,344
public function setVRId ( string $ vr_id ) : CNabuDataObject { if ( $ vr_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$vr_id" ) ) ; } $ this -> setValue ( 'nb_site_visual_editor_item_vr_id' , $ vr_id ) ; return $ this ; }
Sets the Site Visual Editor Item VR Id attribute value .
17,345
public function toDatamapperObject ( ) { if ( is_subclass_of ( $ this -> class , '\ProAI\Datamapper\Support\Entity' ) ) { $ class = $ this -> class ; return $ class :: newFromEloquentObject ( $ this ) ; } $ reflectionClass = new ReflectionClass ( $ this -> class ) ; $ entity = $ reflectionClass -> newInstanceWithoutCon...
Convert model to entity object .
17,346
protected function setProperty ( & $ reflectionClass , $ entity , $ name , $ value ) { $ property = $ reflectionClass -> getProperty ( $ name ) ; $ property -> setAccessible ( true ) ; $ property -> setValue ( $ entity , $ value ) ; }
Set a private property of an entity .
17,347
public function toDataTransferObject ( $ root , $ schema , $ transformations , $ path = '' ) { $ dto = new DataTransferObject ( ) ; if ( $ this -> morphClass ) { $ morphKey = '...' . Str :: studly ( $ this -> morphClass ) ; if ( isset ( $ schema [ $ morphKey ] ) ) { $ schema = $ schema [ $ morphKey ] ; } } foreach ( $ ...
Convert model to data transfer object .
17,348
public static function newFromDatamapperObject ( EntityContract $ entity , $ lastObjectId = null , $ lastEloquentModel = null ) { if ( $ entity instanceof \ ProAI \ Datamapper \ Support \ Entity ) { return $ entity -> toEloquentObject ( $ lastObjectId , $ lastEloquentModel ) ; } $ class = get_mapped_model ( get_class (...
Convert model to plain old php object .
17,349
public function isAutomaticallyUpdatedDate ( $ attribute ) { if ( in_array ( 'Illuminate\Database\Eloquent\SoftDeletes' , class_uses ( static :: class ) ) && $ attribute == $ this -> getDeletedAtColumn ( ) ) { return true ; } if ( $ this -> timestamps && ( $ attribute == $ this -> getCreatedAtColumn ( ) || $ attribute ...
Check if attribute is auto generated and updated date .
17,350
protected function getProperty ( $ reflectionObject , $ entity , $ name ) { $ property = $ reflectionObject -> getProperty ( $ name ) ; $ property -> setAccessible ( true ) ; return $ property -> getValue ( $ entity ) ; }
Get a private property of an entity .
17,351
protected function getColumnName ( $ name ) { if ( isset ( $ this -> mapping [ 'attributes' ] [ $ name ] ) ) { return $ this -> mapping [ 'attributes' ] [ $ name ] ; } foreach ( $ this -> mapping [ 'embeddeds' ] as $ embedded ) { if ( isset ( $ embedded [ 'attributes' ] [ $ name ] ) ) { return $ embedded [ 'attributes'...
Get column name of a schema name .
17,352
public function getMedioteca ( $ nb_medioteca ) { $ nb_medioteca_id = nb_getMixedValue ( $ nb_medioteca , NABU_MEDIOTECA_FIELD_ID ) ; return is_numeric ( $ nb_medioteca_id ) || nb_isValidGUID ( $ nb_medioteca_id ) ? $ this -> nb_medioteca_list -> getItem ( $ nb_medioteca_id ) : false ; }
Gets a Medioteca Instance .
17,353
public function getMediotecas ( $ force = false ) { if ( $ this -> nb_medioteca_list -> isEmpty ( ) || $ force ) { $ this -> nb_medioteca_list -> merge ( CNabuMedioteca :: getMediotecasForCustomer ( CNabuEngine :: getEngine ( ) -> getCustomer ( ) ) ) ; } return $ this -> nb_medioteca_list ; }
Gets the collection of Mediotecas
17,354
public function getLanguage ( $ nb_language ) { $ retval = false ; $ nb_language_id = nb_getMixedValue ( $ nb_language , NABU_LANG_FIELD_ID ) ; if ( is_numeric ( $ nb_language_id ) || nb_isValidGUID ( $ nb_language_id ) ) { $ this -> getLanguages ( ) ; if ( $ this -> languages_list -> containsKey ( $ nb_language_id ) )...
Gets the language object owned by this object that represents a language entity allowed for them
17,355
public function setLanguage ( CNabuLanguage $ nb_language ) { if ( $ nb_language -> isValueNumeric ( NABU_LANG_FIELD_ID ) || $ nb_language -> isValueGUID ( NABU_LANG_FIELD_ID ) ) { $ nb_language_id = $ nb_language -> getValue ( NABU_LANG_FIELD_ID ) ; $ this -> languages_list -> addItem ( $ nb_language ) ; } }
Add or replace a language object passed as parameter in the languages collection of this entity
17,356
public function getTranslation ( $ nb_language ) { $ retval = false ; $ nb_language_id = nb_getMixedValue ( $ nb_language , NABU_LANG_FIELD_ID ) ; if ( is_numeric ( $ nb_language_id ) || nb_isValidGUID ( $ nb_language_id ) ) { $ this -> getTranslations ( ) ; if ( $ this -> translations_list -> containsKey ( $ nb_langua...
Get the translation child object that represents the translated fields of this entity
17,357
public function hasTranslations ( bool $ force = false ) { $ this -> getTranslations ( $ force ) ; return $ this -> translations_list -> isFilled ( ) ; }
Check if the instance have at least one item in the translations collection .
17,358
public function setTranslation ( INabuTranslation $ nb_translation ) { if ( $ this -> checkForValidTranslationInstance ( $ nb_translation ) && ( $ nb_translation -> isValueNumeric ( NABU_LANG_FIELD_ID ) || $ nb_translation -> isValueGUID ( NABU_LANG_FIELD_ID ) ) ) { $ nb_translation -> setTranslatedObject ( $ this ) ; ...
Add or replace a translation child object that represents the translated fields of this entity
17,359
public function removeTranslation ( $ nb_translation ) { if ( $ this -> checkForValidTranslationInstance ( $ nb_translation ) && ( $ nb_translation -> isValueNumeric ( NABU_LANG_FIELD_ID ) || $ nb_translation -> isValueGUID ( NABU_LANG_FIELD_ID ) ) ) { $ nb_language_id = $ nb_translation -> getValue ( NABU_LANG_FIELD_I...
Remove a translation child object from the internal list of this entity . If after this action you calls updateTranslations method then it call the delete method to remove definitely this translation from the database
17,360
protected function getClasses ( ) { $ class = $ this -> argument ( 'class' ) ; if ( $ class ) { if ( class_exists ( $ class ) ) { $ classes = [ $ class ] ; } elseif ( class_exists ( $ this -> config [ 'models_namespace' ] . '\\' . $ class ) ) { $ classes = [ $ this -> config [ 'models_namespace' ] . '\\' . $ class ] ; ...
Get classes by class argument or by app namespace .
17,361
protected function outputQueries ( $ statements ) { $ this -> info ( PHP_EOL . 'Outputting queries:' ) ; if ( empty ( $ statements ) ) { $ this -> info ( "No queries found." ) ; } else { $ this -> info ( implode ( ';' . PHP_EOL , $ statements ) ) ; } }
Output SQL queries .
17,362
protected function dumpFile ( string $ filename ) { if ( strlen ( $ filename ) > 0 && file_exists ( $ filename ) && is_file ( $ filename ) ) { echo file_get_contents ( $ filename ) ; return true ; } return false ; }
Basic functionality to dump a file to the output stream .
17,363
public function registerAll ( ) { foreach ( $ this -> files -> allFiles ( $ this -> path ) as $ file ) { AnnotationRegistry :: registerFile ( $ file -> getRealPath ( ) ) ; } }
Register all annotations .
17,364
public function populate ( int $ deep = 0 ) { $ nb_site = $ this -> getSite ( ) ; $ this -> merge ( CNabuSiteMap :: getMapsForSite ( $ nb_site ) ) ; $ translations = CNabuSiteMapLanguage :: getMapTranslationsForSite ( $ nb_site ) ; if ( is_array ( $ translations ) && count ( $ translations ) > 0 ) { foreach ( $ transla...
Populates the Site Map with all Items .
17,365
public function fillFromSite ( $ nb_site ) : int { $ this -> clear ( ) ; $ this -> merge ( CNabuRole :: getRolesForSite ( $ nb_site ) ) ; return $ this -> getSize ( ) ; }
Clear the list and fill it from Roles assigned to a Site .
17,366
public static function findByKey ( $ nb_commerce , $ key ) { $ nb_commerce_id = nb_getMixedValue ( $ nb_commerce , 'nb_commerce_id' ) ; if ( is_numeric ( $ nb_commerce_id ) ) { $ retval = CNabuCommerceProductCategory :: buildObjectFromSQL ( 'select * ' . 'from nb_commerce_product_category ' . 'where nb_commerce_id=%com...
Find an instance identified by nb_commerce_product_category_key field .
17,367
public static function getAllCommerceProductCategories ( CNabuCommerce $ nb_commerce ) { $ nb_commerce_id = nb_getMixedValue ( $ nb_commerce , 'nb_commerce_id' ) ; if ( is_numeric ( $ nb_commerce_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_commerce_product_c...
Get all items in the storage as an associative array where the field nb_commerce_product_category_id is the index and each value is an instance of class CNabuCommerceProductCategoryBase .
17,368
public function setCommerceId ( int $ nb_commerce_id ) : CNabuDataObject { if ( $ nb_commerce_id === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$nb_commerce_id" ) ) ; } $ this -> setValue ( 'nb_commerce_id' , $ nb_commerce_id ) ; return $ this ; }
Sets the Commerce Id attribute value .
17,369
public static function hydrateCollection ( array $ comparisons ) { $ hydrated = [ ] ; foreach ( $ comparisons as $ comparison ) { $ hydrated [ ] = self :: hydrate ( $ comparison ) ; } return $ hydrated ; }
Hydrate a collection of concat objects into a collection of ComparisonEntity objects
17,370
public static function hydrate ( stdClass $ comparison ) { $ hydrated = new ComparisonEntity ( ) ; if ( isset ( $ comparison -> id ) ) { $ hydrated -> setId ( $ comparison -> id ) ; } if ( isset ( $ comparison -> allowedMisses ) ) { $ hydrated -> setAllowedMisses ( $ comparison -> allowedMisses ) ; } if ( isset ( $ com...
Hydrate a comparison object into a ComparisonEntity object
17,371
public function getTemplates ( $ force = false ) { if ( $ this -> nb_messaging_template_list === null ) { $ this -> nb_messaging_template_list = new CNabuMessagingTemplateList ( ) ; } if ( $ this -> nb_messaging_template_list -> isEmpty ( ) || $ force ) { $ this -> nb_messaging_template_list -> clear ( ) ; $ this -> nb...
Get Templates assigned to this Messaging instance .
17,372
public function getTemplate ( $ nb_template ) { $ retval = false ; if ( is_numeric ( $ nb_template_id = nb_getMixedValue ( $ nb_template , NABU_MESSAGING_TEMPLATE_FIELD_ID ) ) ) { $ retval = $ this -> nb_messaging_template_list -> getItem ( $ nb_template_id ) ; if ( $ retval instanceof CNabuMessagingTemplate && $ retva...
Gets a Template by Id .
17,373
public function getTemplateByKey ( string $ key ) { $ retval = false ; if ( is_string ( $ key ) && strlen ( $ key ) > 0 ) { $ this -> getTemplates ( ) ; $ retval = $ this -> nb_messaging_template_list -> getItem ( $ key , CNabuMessagingTemplateList :: INDEX_KEY ) ; } return $ retval ; }
Gets a Template by Key .
17,374
public function getFactory ( ) { $ nb_engine = CNabuEngine :: getEngine ( ) ; if ( ! ( $ this -> nb_messaging_pool_manager instanceof CNabuMessagingPoolManager ) ) { $ this -> nb_messaging_pool_manager = CNabuEngine :: getEngine ( ) -> getMessagingPoolManager ( ) ; } if ( ! ( $ this -> nb_messaging_factory instanceof C...
Get the Factory to produce and send messages . If she is not instantiates then instantiates one and catches it .
17,375
protected function scanEntities ( ) { $ app = $ this -> app ; $ classes = $ app [ 'datamapper.classfinder' ] -> getClassesFromNamespace ( $ app [ 'config' ] [ 'datamapper.models_namespace' ] ) ; $ metadata = $ app [ 'datamapper.entity.scanner' ] -> scan ( $ classes , $ app [ 'config' ] [ 'datamapper.namespace_tablename...
Scan entity annotations and update database .
17,376
protected function registerEloquentModels ( ) { $ files = $ this -> app [ 'files' ] -> files ( storage_path ( 'framework/entities' ) ) ; foreach ( $ files as $ file ) { if ( $ this -> app [ 'files' ] -> extension ( $ file ) == '' ) { require_once $ file ; } } }
Load the compiled eloquent entity models .
17,377
public function getSitesIndex ( ) { if ( $ this -> isValueNumeric ( 'nb_server_id' ) ) { $ retval = CNabuSite :: buildObjectListFromSQL ( 'nb_site_id' , "SELECT distinct si.* FROM nb_site si INNER JOIN nb_cluster_group cg ON si.nb_cluster_group_id=cg.nb...
Get all available sites to be indexed in the Web Server
17,378
public function getAdminUser ( $ force = false ) { if ( $ this -> nb_admin_user === null || $ force ) { $ this -> nb_admin_user = null ; if ( $ this -> isValueNumeric ( 'nb_server_admin_user_id' ) ) { $ nb_user = new CNabuUser ( $ this -> getAdminUserId ( ) ) ; if ( $ nb_user -> isFetched ( ) ) { $ this -> nb_admin_use...
Gets the Admin User instance of this server instance .
17,379
public function getCountry ( ) { try { $ address = $ this -> remoteAddress -> getRemoteAddress ( ) ; return $ this -> getReader ( ) -> country ( $ address ) -> country -> isoCode ; } catch ( \ Exception $ e ) { return null ; } }
Gets country from remote address .
17,380
public function render ( ) { if ( $ this -> discoverInterface ( ) ) { $ this -> nb_interface -> render ( ) ; } else { throw new ENabuRenderException ( ENabuRenderException :: ERROR_RENDER_NOT_FOUND , array ( $ this -> nb_descriptor -> getKey ( ) ) ) ; } }
This method render the content passed as parameter and exposes the result in the default output stream .
17,381
public function setMIMEType ( string $ mimetype ) { if ( $ this -> discoverInterface ( ) ) { $ this -> nb_interface -> setMIMEType ( $ mimetype ) ; } else { throw new ENabuRenderException ( ENabuRenderException :: ERROR_RENDER_NOT_FOUND , array ( $ this -> nb_descriptor -> getKey ( ) ) ) ; } return $ this ; }
Pass MIME Type to Render Instance .
17,382
public function getAll ( $ appId , $ profileId , array $ queryParams ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> controllers ( ) -> getAll ( $ appId , $ profileId , $ queryParams ) ; return new ControllersResponse ( $ response ) ; }
Get all controllers for a profile profile
17,383
public function getById ( $ appId , $ profileId , $ controllerId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> controllers ( ) -> getById ( $ appId , $ profileId , $ controllerId , $ queryParams ) ; return new ControllerResponse ( $ response ) ; }
Get controller for profile profile by id
17,384
public function create ( $ appId , $ profileId , ControllerBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> profiles ( ) -> controllers ( ) -> create ( $ appId , $ profileId , $ input -> toArray ( ) , $ queryParams ) ; return new ControllerResponse ( $ response ) ; }
Create controller for profile profile
17,385
public function getAll ( $ appId , $ scanId , $ issueId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> patches ( ) -> getAll ( $ appId , $ scanId , $ issueId , $ queryParams ) ; return new PatchesResponse ( $ response ) ; }
Get all patches for an issue
17,386
public function getById ( $ appId , $ scanId , $ issueId , $ patchId , array $ queryParams = [ ] ) { $ response = $ this -> api -> applications ( ) -> scans ( ) -> issues ( ) -> patches ( ) -> getById ( $ appId , $ scanId , $ issueId , $ patchId , $ queryParams ) ; return new PatchResponse ( $ response ) ; }
Get patch for an issue by id
17,387
public static function hydrateCollection ( array $ reviews ) { $ hydrated = [ ] ; foreach ( $ reviews as $ review ) { $ hydrated [ ] = self :: hydrate ( $ review ) ; } return $ hydrated ; }
Hydrate a collection of review objects into a collection of ReviewEntity objects
17,388
public static function hydrate ( stdClass $ review ) { $ hydrated = new ReviewEntity ( ) ; if ( isset ( $ review -> id ) ) { $ hydrated -> setId ( $ review -> id ) ; } if ( isset ( $ review -> created_at ) ) { $ hydrated -> setCreatedAt ( new DateTime ( $ review -> created_at ) ) ; } if ( isset ( $ review -> type ) ) {...
Hydrate a review object into a ReviewEntity object
17,389
public function getIContactProspect ( $ force = false ) { if ( $ this -> nb_icontact_prospect === null || $ force ) { $ this -> nb_icontact_prospect = null ; if ( $ this instanceof CNabuDataObject && ! $ this -> isBuiltIn ( ) && $ this -> isValueNumeric ( NABU_ICONTACT_PROSPECT_FIELD_ID ) ) { $ nb_icontact_prospect = n...
Gets the iContact Prospect instance that owns this object .
17,390
public function setIContactProspect ( CNabuIContactProspect $ nb_icontact_prospect ) { $ this -> nb_icontact_prospect = $ nb_icontact_prospect ; if ( $ this instanceof CNabuDataObject && $ nb_icontact_prospect -> contains ( NABU_ICONTACT_PROSPECT_FIELD_ID ) ) { $ this -> transferValue ( $ nb_icontact_prospect , NABU_IC...
Sets the iContact Prospect instance that onws this object .
17,391
static public function getCTARolesForSiteTarget ( $ nb_site_target ) { $ nb_site_target_id = nb_getMixedValue ( $ nb_site_target , NABU_SITE_TARGET_FIELD_ID ) ; if ( is_numeric ( $ nb_site_target_id ) ) { $ retval = CNabuEngine :: getEngine ( ) -> getMainDB ( ) -> getQueryAsObjectArray ( '\nabu\data\site\CNabuSiteTarge...
Get all roles to be applied to all CTAs of a Site Target .
17,392
public function toDatamapperObject ( ) { $ entities = new DatamapperCollection ; foreach ( $ this -> items as $ name => $ item ) { $ entities -> put ( $ name , $ item -> toDatamapperObject ( ) ) ; } return $ entities ; }
Convert models to entity objects .
17,393
public function toDataTransferObject ( string $ root , array $ schema , array $ transformations , $ path = '' ) { $ entities = new DatamapperCollection ; foreach ( $ this -> items as $ name => $ item ) { $ entities -> put ( $ name , $ item -> toDataTransferObject ( $ root , $ schema , $ transformations , $ path ) ) ; }...
Convert models to data transfer objects .
17,394
public static function newFromDatamapperObject ( $ entities , $ lastObjectId , $ lastEloquentModel ) { $ eloquentModels = new static ; foreach ( $ entities as $ name => $ item ) { if ( spl_object_hash ( $ item ) == $ lastObjectId ) { $ model = $ lastEloquentModel ; } else { $ model = Model :: newFromDatamapperObject ( ...
Convert models to eloquent models .
17,395
public function setTemplatesStatus ( string $ templates_status = "D" ) : CNabuDataObject { if ( $ templates_status === null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_NULL_VALUE_NOT_ALLOWED_IN , array ( "\$templates_status" ) ) ; } $ this -> setValue ( 'nb_messaging_lang_templates_status' , $ templa...
Sets the Messaging Lang Templates Status attribute value .
17,396
public function getAll ( array $ queryParams = [ ] ) { $ response = $ this -> api -> logs ( ) -> getAll ( $ queryParams ) ; return new LogsResponse ( $ response ) ; }
Get all logs
17,397
public function getById ( $ logId , array $ queryParams = [ ] ) { $ response = $ this -> api -> logs ( ) -> getById ( $ logId , $ queryParams ) ; return new LogResponse ( $ response ) ; }
Get a log by id
17,398
public function create ( LogBuilder $ input , array $ queryParams = [ ] ) { $ response = $ this -> api -> logs ( ) -> create ( $ input -> toArray ( ) , $ queryParams ) ; return new LogResponse ( $ response ) ; }
Create a new log
17,399
public static function getAllRoles ( CNabuCustomer $ nb_customer ) { $ nb_customer_id = nb_getMixedValue ( $ nb_customer , 'nb_customer_id' ) ; if ( is_numeric ( $ nb_customer_id ) ) { $ retval = forward_static_call ( array ( get_called_class ( ) , 'buildObjectListFromSQL' ) , 'nb_role_id' , 'select * ' . 'from nb_role...
Get all items in the storage as an associative array where the field nb_role_id is the index and each value is an instance of class CNabuRoleBase .