_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 83 13k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q3800 | PageLayoutCompiler.setAppName | train | private function setAppName(stdClass $scaffolderConfig)
{
$this->stub = str_replace('{{app_name}}', $scaffolderConfig->name, $this->stub);
return $this;
} | php | {
"resource": ""
} |
q3801 | PageLayoutCompiler.setLinks | train | private function setLinks($links, stdClass $scaffolderConfig)
{
$navLinks = '';
foreach ($links as $link)
{
$navLinks .= sprintf("
<li>
<a href='/%s' class='waves-effect'>
%s
</a>
</li>", $scaffolderConf... | php | {
"resource": ""
} |
q3802 | SanitizerService.getAll | train | public function getAll($appId, $profileId, array $queryParams)
{
$response = $this->api->applications()->profiles()->sanitizers()->getAll($appId, $profileId, $queryParams);
return new SanitizersResponse($response);
} | php | {
"resource": ""
} |
q3803 | SanitizerService.getById | train | public function getById($appId, $profileId, $sanitizerId, array $queryParams = [])
{
$response = $this->api->applications()->profiles()->sanitizers()->getById($appId, $profileId, $sanitizerId, $queryParams);
return new SanitizerResponse($response);
} | php | {
"resource": ""
} |
q3804 | SanitizerService.create | train | public function create($appId, $profileId, SanitizerBuilder $input, array $queryParams = [])
{
$response = $this->api->applications()->profiles()->sanitizers()->create($appId, $profileId, $input->toArray(), $queryParams);
return new SanitizerResponse($response);
} | php | {
"resource": ""
} |
q3805 | IgnoredLocationHydrator.hydrateCollection | train | public static function hydrateCollection(array $ignores)
{
$hydrated = [];
foreach ($ignores as $ignore) {
$hydrated[] = self::hydrate($ignore);
}
return $hydrated;
} | php | {
"resource": ""
} |
q3806 | IgnoredLocationHydrator.hydrate | train | public static function hydrate(stdClass $ignore)
{
$hydrated = new IgnoredLocationEntity();
if (isset($ignore->id)) {
$hydrated->setId($ignore->id);
}
if (isset($ignore->path)) {
$hydrated->setPath($ignore->path);
}
if (isset($ignore->match)... | php | {
"resource": ""
} |
q3807 | CustomFunctionHydrator.hydrateCollection | train | public static function hydrateCollection(array $customFunctions)
{
$hydrated = [];
foreach ($customFunctions as $customFunction) {
$hydrated[] = self::hydrate($customFunction);
}
return $hydrated;
} | php | {
"resource": ""
} |
q3808 | CustomFunctionHydrator.hydrate | train | public static function hydrate(stdClass $customFunction)
{
$hydrated = new CustomFunctionEntity();
if (isset($customFunction->id)) {
$hydrated->setId($customFunction->id);
}
if (isset($customFunction->start_line)) {
$hydrated->setStartLine($customFunction->s... | php | {
"resource": ""
} |
q3809 | IndexViewCompiler.compile | train | public function compile($stub, $modelName, $modelData, stdClass $scaffolderConfig, $hash, ScaffolderThemeExtensionInterface $themeExtension, array $extensions, $extra = null)
{
if (File::exists(base_path('scaffolder-config/cache/view_index_' . $hash . self::CACHE_EXT)))
{
return $this->s... | php | {
"resource": ""
} |
q3810 | IndexViewCompiler.addDatatableFields | train | private function addDatatableFields($modelName, $modelData)
{
$fields = '';
$firstIteration = true;
foreach ($modelData->fields as $field)
{
if ($field->hideInListings === false)
{
if ($firstIteration)
{
$fi... | php | {
"resource": ""
} |
q3811 | Helpers.getVersionedResourceClassName | train | protected function getVersionedResourceClassName($group, $name)
{
$class = \str_replace('.', '\\', $name);
$version = $this->getVersionNamespace();
return \sprintf('%s\%s\%s\%s', $this->namespace, $group, $version, $class);
} | php | {
"resource": ""
} |
q3812 | Helpers.getVersionNamespace | train | protected function getVersionNamespace()
{
$version = $this->api()->getVersion();
$supported = $this->getSupportedVersionNamespace();
if (isset($supported[$version])) {
return $supported[$version];
}
return 'Base';
} | php | {
"resource": ""
} |
q3813 | CNabuCatalogItem.getItemsForCatalog | train | static public function getItemsForCatalog($nb_catalog, int $level)
{
$nb_catalog_id = nb_getMixedValue($nb_catalog, NABU_CATALOG_FIELD_ID);
if (is_numeric($nb_catalog_id)) {
$retval = CNabuCatalogItem::buildObjectListFromSQL(
NABU_CATALOG_ITEM_FIELD_ID,
'S... | php | {
"resource": ""
} |
q3814 | CNabuCatalogItem.getItemTranslationsForCatalog | train | static public function getItemTranslationsForCatalog($nb_catalog, int $level)
{
$nb_catalog_id = nb_getMixedValue($nb_catalog, NABU_CATALOG_FIELD_ID);
if (is_numeric($nb_catalog_id)) {
$retval = CNabuCatalogItemLanguage::buildObjectListFromSQL(
null,
'SELE... | php | {
"resource": ""
} |
q3815 | CNabuCatalogItem.getItems | train | public function getItems(bool $force = false) : CNabuCatalogItemList
{
if ($this->nb_tree_child_list->isEmpty() || $force) {
$this->nb_tree_child_list->merge(
CNabuCatalogItem::buildObjectListFromSQL(
'nb_catalog_item_id',
'SELECT *
... | php | {
"resource": ""
} |
q3816 | CNabuCatalogTaxonomyBase.getAllCatalogTaxonomies | train | public static function getAllCatalogTaxonomies(CNabuCatalog $nb_catalog)
{
$nb_catalog_id = nb_getMixedValue($nb_catalog, 'nb_catalog_id');
if (is_numeric($nb_catalog_id)) {
$retval = forward_static_call(
array(get_called_class(), 'buildObjectListFromSQL'),
'n... | php | {
"resource": ""
} |
q3817 | CNabuCatalogTaxonomyBase.setScope | train | public function setScope(string $scope = "O") : CNabuDataObject
{
if ($scope === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$scope")
);
}
$this->setValue('nb_catalog_taxono... | php | {
"resource": ""
} |
q3818 | CNabuUserGroupMemberBase.setNew | train | public function setNew(string $new = "T") : CNabuDataObject
{
if ($new === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$new")
);
}
$this->setValue('nb_user_group_member_new'... | php | {
"resource": ""
} |
q3819 | CNabuUserGroupMemberBase.setAdmin | train | public function setAdmin(string $admin = "F") : CNabuDataObject
{
if ($admin === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$admin")
);
}
$this->setValue('nb_user_group_mem... | php | {
"resource": ""
} |
q3820 | CNabuProviderModuleManagerAdapter.setVendorKey | train | public function setVendorKey(string $vendor_key)
{
if (!nb_isValidKey($vendor_key)) {
throw new ENabuProviderException(ENabuProviderException::ERROR_VENDOR_KEY_NOT_VALID, array($vendor_key));
}
$this->setValue(self::VENDOR_KEY, $vendor_key);
try {
$thi... | php | {
"resource": ""
} |
q3821 | CNabuProviderModuleManagerAdapter.setModuleKey | train | public function setModuleKey(string $module_key)
{
if (!nb_isValidKey($module_key)) {
throw new ENabuProviderException(ENabuProviderException::ERROR_MODULE_KEY_NOT_VALID, array($module_key));
}
$this->setValue(self::MODULE_KEY, $module_key);
try {
$this->getC... | php | {
"resource": ""
} |
q3822 | CNabuUserGroupTypeBase.getAllUserGroupTypes | train | public static function getAllUserGroupTypes(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'),
... | php | {
"resource": ""
} |
q3823 | CNabuUserGroupTypeBase.setExclusive | train | public function setExclusive(string $exclusive = "F") : CNabuDataObject
{
if ($exclusive === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$exclusive")
);
}
$this->setValue('n... | php | {
"resource": ""
} |
q3824 | CNabuUserGroupTypeBase.setCreatorOwner | train | public function setCreatorOwner(string $creator_owner = "T") : CNabuDataObject
{
if ($creator_owner === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$creator_owner")
);
}
$th... | php | {
"resource": ""
} |
q3825 | ChildMe.addElementTableAttributes | train | protected function addElementTableAttributes()
{
$segments = Craft::$app->getRequest()->getSegments();
$actionSegment = $segments[count($segments) - 1] ?? null;
$classes = [Entry::class, Category::class];
foreach ($classes as $class) {
// Register "Add child" attribute... | php | {
"resource": ""
} |
q3826 | CNabuCommerceProductCategoryLanguageBase.setCommerceProductCategoryId | train | public function setCommerceProductCategoryId(int $nb_commerce_product_category_id) : CNabuDataObject
{
if ($nb_commerce_product_category_id === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$nb_commerce_... | php | {
"resource": ""
} |
q3827 | CNabuUserGroupBase.getAllUserGroups | train | public static function getAllUserGroups(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... | php | {
"resource": ""
} |
q3828 | CNabuUserGroupBase.setStatus | train | public function setStatus(string $status = "E") : CNabuDataObject
{
if ($status === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$status")
);
}
$this->setValue('nb_user_group... | php | {
"resource": ""
} |
q3829 | CNabuCommerce.newProductCategory | train | public function newProductCategory(string $key = null, int $order = 1) : CNabuCommerceProductCategory
{
$nb_commerce_product_category = $this->isBuiltIn()
? new CNabuBuiltInCommerceProductCategory()
: new CNabuCommerceProductCategor... | php | {
"resource": ""
} |
q3830 | CNabuCommerce.addProductCategoryObject | train | public function addProductCategoryObject(CNabuCommerceProductCategory $nb_commerce_product_category)
{
$nb_commerce_product_category->setCommerce($this);
return $this->nb_commerce_product_category_list->addItem($nb_commerce_product_category);
} | php | {
"resource": ""
} |
q3831 | CNabuCommerce.getProductCategory | train | public function getProductCategory($nb_commerce_product_category)
{
$nb_category = false;
$nb_category_id = nb_getMixedValue($nb_commerce_product_category, NABU_COMMERCE_PRODUCT_CATEGORY_FIELD_ID);
if (is_numeric($nb_category_id)) {
$nb_category = $this->nb_commerce_product_categ... | php | {
"resource": ""
} |
q3832 | CNabuCommerce.getProductCategories | train | public function getProductCategories(bool $force = false) : CNabuCommerceProductCategoryList
{
if ($this->nb_commerce_product_category_list->isEmpty() || $force) {
$this->nb_commerce_product_category_list->clear();
$this->nb_commerce_product_category_list->merge(
CNab... | php | {
"resource": ""
} |
q3833 | CNabuCommerce.getProducts | train | public function getProducts(bool $force = false) : CNabuCommerceProductList
{
if ($this->nb_commerce_product_list->isEmpty() || $force) {
$this->nb_commerce_product_list->clear();
$this->nb_commerce_product_list->merge(
CNabuCommerceProduct::getProductsForCommerce($th... | php | {
"resource": ""
} |
q3834 | CNabuCommerce.getProduct | train | public function getProduct($nb_commerce_product)
{
$nb_product = false;
$nb_product_id = nb_getMixedValue($nb_commerce_product, NABU_COMMERCE_PRODUCT_FIELD_ID);
if (is_numeric($nb_product_id)) {
$nb_product = $this->nb_commerce_product_list->getItem($nb_product_id);
}
... | php | {
"resource": ""
} |
q3835 | CNabuCommerce.findProductBySlug | train | public function findProductBySlug(string $slug, $nb_language = null)
{
$retval = false;
$nb_language_id = nb_getMixedValue($nb_language, NABU_LANG_FIELD_ID);
$this->getProducts()->iterate(
function ($key, CNabuCommerceProduct $nb_product)
use (&$retval, $slug, $... | php | {
"resource": ""
} |
q3836 | CNabuCommerce.refresh | train | public function refresh(bool $force = false, bool $cascade = false) : bool
{
return parent::refresh($force, $cascade) &&
(!$cascade || (
$this->getProductCategories($force) &&
$this->getProducts($force)
))
;
} | php | {
"resource": ""
} |
q3837 | CNabuHTTPServerAdapter.isServerValid | train | public function isServerValid()
{
return ($this->nb_server !== null &&
($this->nb_server->isBuiltIn() || $this->nb_server->isFetched()));
} | php | {
"resource": ""
} |
q3838 | CNabuMessagingServiceStackAttachmentBase.setMessagingServiceStackId | train | public function setMessagingServiceStackId(int $nb_messaging_service_stack_id) : CNabuDataObject
{
if ($nb_messaging_service_stack_id === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$nb_messaging_servi... | php | {
"resource": ""
} |
q3839 | CNabuRenderTransformFactory.transform | train | public function transform($source)
{
if ($this->discoverInterface()) {
$this->nb_interface->transform($source);
} else {
throw new ENabuRenderException(
ENabuRenderException::ERROR_RENDER_TRANSFORM_NOT_FOUND,
array($this->nb_descriptor->getKey(... | php | {
"resource": ""
} |
q3840 | TNabuSiteChild.getSite | train | public function getSite(CNabuCustomer $nb_customer = null, $force = false)
{
if ($nb_customer !== null && ($this->nb_site === null || $force)) {
$this->nb_site = null;
if ($this instanceof CNabuDataObject && $this->contains(NABU_SITE_FIELD_ID)) {
$this->nb_site = $nb_... | php | {
"resource": ""
} |
q3841 | TNabuSiteChild.setSite | train | public function setSite(CNabuSite $nb_site = null, $field = NABU_SITE_FIELD_ID)
{
$this->nb_site = $nb_site;
if ($this instanceof CNabuDataObject) {
$this->transferValue($nb_site, $field);
}
return $this;
} | php | {
"resource": ""
} |
q3842 | Actor.equals | train | public function equals(StatementObject $actor): bool
{
if (!parent::equals($actor)) {
return false;
}
if (!$actor instanceof Actor) {
return false;
}
if ($this->name !== $actor->name) {
return false;
}
if (null !== $this-... | php | {
"resource": ""
} |
q3843 | FileUtils.mkdir | train | public static function mkdir($path, $mode = 0755)
{
$filesystem = new Filesystem();
try {
$filesystem->mkdir($path, $mode);
} catch (IOException $exception) {
return false;
}
return true;
} | php | {
"resource": ""
} |
q3844 | FileUtils.rmdir | train | public static function rmdir($path)
{
$files = array_diff(scandir($path), array('.', '..'));
$filesystem = new Filesystem();
foreach ($files as $file) {
$file = $path . DIRECTORY_SEPARATOR . $file;
if (!file_exists($file)) {
continue;
}
... | php | {
"resource": ""
} |
q3845 | FileUtils.detectStream | train | private static function detectStream($path)
{
$stream = 'file';
if (false !== strpos($path, '://')) {
$parts = explode('://', $path);
$stream = $parts[0];
}
return $stream;
} | php | {
"resource": ""
} |
q3846 | LanguageService.getAll | train | public function getAll(array $queryParams = [])
{
$response = $this->api->languages()->getAll($queryParams);
return new LanguagesResponse($response);
} | php | {
"resource": ""
} |
q3847 | LanguageService.getById | train | public function getById($languageId, array $queryParams = [])
{
$response = $this->api->languages()->getById($languageId, $queryParams);
return new LanguageResponse($response);
} | php | {
"resource": ""
} |
q3848 | CNabuHTTPResponse.calculateFrameOptions | train | private function calculateFrameOptions()
{
$retval = null;
$nb_site = $this->nb_request->getSite();
switch ($nb_site->getXFrameOptions()) {
case 'D':
$retval = 'DENY';
break;
case 'S':
$retval = 'SAMEORIGIN';
... | php | {
"resource": ""
} |
q3849 | CNabuHTTPResponse.buildHeaders | train | public function buildHeaders()
{
if ($this->use_cors) {
if (strlen($this->cors_allow_origin) > 0) {
header("Access-Control-Allow-Origin: $this->cors_allow_origin");
}
if ($this->cors_with_credentials) {
header('Access-Control-Allow-Credenti... | php | {
"resource": ""
} |
q3850 | CNabuHTTPResponse.getRender | train | public function getRender()
{
if ($this->render_factory !== null) {
$retval = $this->render_factory->getInterface();
} else {
$retval = $this->render;
}
return $retval;
} | php | {
"resource": ""
} |
q3851 | CNabuHTTPResponse.redirect | train | public function redirect($code, $nb_site_target, $nb_language = null, $params = null)
{
global $NABU_HTTP_CODES;
if (is_string($nb_site_target)) {
$url = new CNabuURL($nb_site_target);
if (!$url->isValid()) {
$nb_site_target = CNabuSiteTarget::findByKey($this... | php | {
"resource": ""
} |
q3852 | DB.query | train | public function query($q, $params = array()){
try{
if(!empty($this->pdo)){
$this->st = $this->pdo->prepare($q);
if(!empty($params)){
$keys = array_keys($params);
$qmark = false;//qmark = question mark
if(is_int($keys[0])){//mode '?'
$qmark = true;
}
foreach($params as $p => ... | php | {
"resource": ""
} |
q3853 | ContextService.getUserInfo | train | public function getUserInfo(array $params)
{
$this->logger->debug('Get User Info.');
if (array_key_exists("error", $params)) {
$this->logger->error(
$params["error"].array_key_exists("error_description", $params) ? $params["error_description"] : ''
);
... | php | {
"resource": ""
} |
q3854 | ContextService.verifyState | train | private function verifyState($state)
{
$this->logger->debug('Verify parameter state.');
$state = urldecode($state);
$stateArray = [];
parse_str($state, $stateArray);
$token = $stateArray['token'];
$token = preg_replace('~{~', '', $token, 1);
$token = preg_repl... | php | {
"resource": ""
} |
q3855 | ContextService.getAccessToken | train | private function getAccessToken($code)
{
$this->logger->debug('Get Access Token.');
$this->initRequest();
$token_url = $this->fcBaseUrl.'token';
$post_data = [
"grant_type" => "authorization_code",
"redirect_uri" => $this->callbackUrl,
"client_... | php | {
"resource": ""
} |
q3856 | ContextService.setPostFields | train | private function setPostFields(array $post_data)
{
$pd = [];
foreach ($post_data as $k => $v) {
$pd[] = "$k=$v";
}
$pd = implode("&", $pd);
\Unirest\Request::curlOpt(CURLOPT_POST, true);
\Unirest\Request::curlOpt(CURLOPT_POSTFIELDS, $pd);
\Unirest\... | php | {
"resource": ""
} |
q3857 | SourceService.getAll | train | public function getAll($appId, $scanId, array $queryParams = [])
{
$response = $this->api
->applications()
->scans()
->sources()
->getAll($appId, $scanId, $queryParams);
return new SourcesResponse($response);
} | php | {
"resource": ""
} |
q3858 | SourceService.getById | train | public function getById($appId, $scanId, $sourceId, array $queryParams = [])
{
$response = $this->api
->applications()
->scans()
->sources()
->getById($appId, $scanId, $sourceId, $queryParams);
return new SourceResponse($response);
} | php | {
"resource": ""
} |
q3859 | InverseFunctionalIdentifier.equals | train | public function equals(InverseFunctionalIdentifier $iri): bool
{
if (null !== $this->mbox && null !== $iri->mbox && !$this->mbox->equals($iri->mbox)) {
return false;
}
if ($this->mboxSha1Sum !== $iri->mboxSha1Sum) {
return false;
}
if ($this->openId ... | php | {
"resource": ""
} |
q3860 | UploadService.getAll | train | public function getAll($appId = null, array $queryParams = [])
{
$response = $this->api->applications()->uploads()->getAll($appId, $queryParams);
return new UploadsResponse($response);
} | php | {
"resource": ""
} |
q3861 | UploadService.getById | train | public function getById($appId, $uploadId, array $queryParams = [])
{
$response = $this->api->applications()->uploads()->getById($appId, $uploadId, $queryParams);
return new UploadResponse($response);
} | php | {
"resource": ""
} |
q3862 | UploadService.deleteAll | train | public function deleteAll($appId, array $queryParams = [])
{
$response = $this->api->applications()->uploads()->deleteAll($appId, $queryParams);
return new BaseResponse($response);
} | php | {
"resource": ""
} |
q3863 | UploadService.deleteById | train | public function deleteById($appId, $uploadId, array $queryParams = [])
{
$response = $this->api->applications()->uploads()->deleteById($appId, $uploadId, $queryParams);
return new BaseResponse($response);
} | php | {
"resource": ""
} |
q3864 | IgnoredCodeHydrator.hydrate | train | public static function hydrate(stdClass $ignore)
{
$hydrated = new IgnoredCodeEntity();
if (isset($ignore->id)) {
$hydrated->setId($ignore->id);
}
if (isset($ignore->class)) {
$hydrated->setClass($ignore->class);
}
if (isset($ignore->method)... | php | {
"resource": ""
} |
q3865 | AclHydrator.hydrateCollection | train | public static function hydrateCollection(array $acls)
{
$hydrated = [];
foreach ($acls as $acl) {
$hydrated[] = self::hydrate($acl);
}
return $hydrated;
} | php | {
"resource": ""
} |
q3866 | CNabuServerHostBase.setServerId | train | public function setServerId(int $nb_server_id) : CNabuDataObject
{
if ($nb_server_id === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$nb_server_id")
);
}
$this->setValue('nb... | php | {
"resource": ""
} |
q3867 | CNabuServerHostBase.setIPId | train | public function setIPId(int $nb_ip_id) : CNabuDataObject
{
if ($nb_ip_id === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$nb_ip_id")
);
}
$this->setValue('nb_ip_id', $nb_ip_... | php | {
"resource": ""
} |
q3868 | CNabuServerHostBase.setClusterGroupServiceId | train | public function setClusterGroupServiceId(int $nb_cluster_group_service_id) : CNabuDataObject
{
if ($nb_cluster_group_service_id === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$nb_cluster_group_service... | php | {
"resource": ""
} |
q3869 | CNabuServerHostBase.setPort | train | public function setPort(int $port = 80) : CNabuDataObject
{
if ($port === null) {
throw new ENabuCoreException(
ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
array("\$port")
);
}
$this->setValue('nb_server_host_port', $po... | php | {
"resource": ""
} |
q3870 | CNabuSiteTarget.findByURL | train | public static function findByURL(CNabuSite $nb_site, string $target_url)
{
$retval = null;
if ($nb_site->isPublicBasePathEnabled()) {
$check_pbp = CNabuEngine::getEngine()->getMainDB()->getQueryAsSingleField(
'nb_site_lang_public_base_path',
"SELECT *
... | php | {
"resource": ""
} |
q3871 | CNabuSiteTarget.addCTAObject | train | public function addCTAObject(CNabuSiteTargetCTA $nb_site_target_cta)
{
$nb_site_target_cta->setSiteTarget($this);
return $this->nb_site_target_cta_list->addItem($nb_site_target_cta);
} | php | {
"resource": ""
} |
q3872 | CNabuSiteTarget.getCTAs | train | public function getCTAs($force = false)
{
if ($this->nb_site_target_cta_list->isEmpty() || $force) {
$this->nb_site_target_cta_list->clear();
$this->nb_site_target_cta_list->merge(CNabuSiteTargetCTA::getSiteTargetCTAs($this));
$translations = CNabuSiteTargetCTALanguage::g... | php | {
"resource": ""
} |
q3873 | CNabuSiteTarget.getCTAByKey | train | public function getCTAByKey($key, $force = false)
{
$this->getCTAs($force);
return $this->nb_site_target_cta_list->getItem($key, CNabuSiteTargetCTAList::INDEX_KEY);
} | php | {
"resource": ""
} |
q3874 | CNabuSiteTarget.getDynamicCacheEffectiveMaxAge | train | public function getDynamicCacheEffectiveMaxAge()
{
if (($nb_site = $this->getSite()) === null) {
throw new ENabuCoreException(ENabuCoreException::ERROR_SITE_NOT_FOUND);
}
$retval = false;
if (($nb_application = CNabuEngine::getEngine()->getApplication()) !== null) {
... | php | {
"resource": ""
} |
q3875 | CNabuSiteUser.logAccess | train | public function logAccess()
{
$this->db->executeUpdate(
"update nb_site_user "
. "set nb_site_user_last_login_datetime=now() "
. "where nb_site_id=%site_id\$d "
. "and nb_role_id=%role_id\$d "
. "and nb_user_id=%user_id\$d",
... | php | {
"resource": ""
} |
q3876 | CNabuSiteUser.getSitesForUser | train | public static function getSitesForUser($nb_user)
{
if (is_numeric ($nb_user_id = nb_getMixedValue($nb_user, NABU_USER_FIELD_ID))) {
$retval = CNabuSiteUser::buildObjectListFromSQL(
'nb_site_id',
'SELECT su.*
FROM nb_site_user su, nb_user u, nb_s... | php | {
"resource": ""
} |
q3877 | CNabuSiteUser.getAvailableSitesForUser | train | public static function getAvailableSitesForUser(CNabuCustomer $nb_customer, $nb_user)
{
if ($nb_customer->isFetched() &&
is_numeric($nb_user_id = nb_getMixedValue($nb_user, NABU_USER_FIELD_ID))
) {
if (!($nb_user = $nb_customer->getUser($nb_user_id))) {
throw ... | php | {
"resource": ""
} |
q3878 | BaseCommand.writeStatus | train | protected function writeStatus($status, $webExecution)
{
if ($webExecution)
{
$cachedStatus = unserialize(Cache::get('scaffolder-status'));
array_push($cachedStatus, $status);
Cache::forever('scaffolder-status', serialize($cachedStatus));
}
else
... | php | {
"resource": ""
} |
q3879 | QuotaService.getAll | train | public function getAll(array $queryParams = [])
{
$response = $this->api->quotas()->getAll($queryParams);
return new QuotasResponse($response);
} | php | {
"resource": ""
} |
q3880 | QuotaService.create | train | public function create(QuotaBuilder $input, array $queryParams = [])
{
$response = $this->api->quotas()->create($input->toArray(), $queryParams);
return new QuotaResponse($response);
} | php | {
"resource": ""
} |
q3881 | QuotaService.update | train | public function update($quotaId, QuotaBuilder $input, array $queryParams = [])
{
$response = $this->api->quotas()->update($quotaId, $input->toArray(), $queryParams);
return new QuotaResponse($response);
} | php | {
"resource": ""
} |
q3882 | QuotaService.deleteAll | train | public function deleteAll(array $queryParams = [])
{
$response = $this->api->quotas()->deleteAll($queryParams);
return new BaseResponse($response);
} | php | {
"resource": ""
} |
q3883 | ContextHydrator.hydrateCollection | train | public static function hydrateCollection(array $contexts)
{
$hydrated = [];
foreach ($contexts as $context) {
$hydrated[] = self::hydrate($context);
}
return $hydrated;
} | php | {
"resource": ""
} |
q3884 | ContextHydrator.hydrate | train | public static function hydrate(stdClass $context)
{
$hydrated = new ContextEntity();
if (isset($context->id)) {
$hydrated->setId($context->id);
}
if (isset($context->parts)) {
$hydrated->setParts(PartHydrator::hydrateCollection($context->parts));
}
... | php | {
"resource": ""
} |
q3885 | CNabuMessagingServiceBase.findByKey | train | public static function findByKey($nb_messaging, $key)
{
$nb_messaging_id = nb_getMixedValue($nb_messaging, 'nb_messaging_id');
if (is_numeric($nb_messaging_id)) {
$retval = CNabuMessagingService::buildObjectFromSQL(
'select * '
. 'from nb_messaging... | php | {
"resource": ""
} |
q3886 | CNabuMessagingServiceBase.getFilteredMessagingServiceList | train | public static function getFilteredMessagingServiceList($nb_messaging = null, $q = null, $fields = null, $order = null, $offset = 0, $num_items = 0)
{
$nb_messaging_id = nb_getMixedValue($nb_customer, NABU_MESSAGING_FIELD_ID);
if (is_numeric($nb_messaging_id)) {
$fields_part = nb_prefixFi... | php | {
"resource": ""
} |
q3887 | TNabuCustomerChild.setCustomer | train | public function setCustomer(CNabuCustomer $nb_customer, $field = NABU_CUSTOMER_FIELD_ID)
{
$this->nb_customer = $nb_customer;
if ($this instanceof CNabuDataObject) {
if ($nb_customer !== null) {
$this->transferValue($nb_customer, NABU_CUSTOMER_FIELD_ID, $field);
... | php | {
"resource": ""
} |
q3888 | TNabuCustomerChild.validateCustomer | train | public function validateCustomer($nb_customer)
{
$nb_customer_id = nb_getMixedValue($nb_customer, NABU_CUSTOMER_FIELD_ID);
return ($this instanceof CNabuDataObject) &&
(is_numeric($nb_customer_id) || nb_isValidGUID($nb_customer_id)) &&
$this->isValueEqualThan(NABU_CUSTO... | php | {
"resource": ""
} |
q3889 | CNabuRenderPoolManager.getRenderFactory | train | public function getRenderFactory(CNabuRenderInterfaceDescriptor $nb_descriptor)
{
if (!($retval = $this->nb_render_factory_list->getItem($nb_descriptor->getKey()))) {
$retval = $this->nb_render_factory_list->addItem(new CNabuRenderFactory($nb_descriptor));
}
return $retval;
... | php | {
"resource": ""
} |
q3890 | CNabuRenderPoolManager.getTransformFactory | train | public function getTransformFactory(CNabuRenderTransformInterfaceDescriptor $nb_descriptor)
{
if (!($retval = $this->nb_render_transform_factory_list->getItem($nb_descriptor->getKey()))) {
$retval = $this->nb_render_transform_factory_list->addItem(new CNabuRenderTransformFactory($nb_descriptor))... | php | {
"resource": ""
} |
q3891 | AclService.getById | train | public function getById($quotaId, $aclId, array $queryParams = [])
{
$response = $this->api->quotas()->acls()->getById($quotaId, $aclId, $queryParams);
return new AclResponse($response);
} | php | {
"resource": ""
} |
q3892 | AclService.create | train | public function create($quotaId, AclBuilder $input, array $queryParams = [])
{
$response = $this->api->quotas()->acls()->create($quotaId, $input->toArray(), $queryParams);
return new AclResponse($response);
} | php | {
"resource": ""
} |
q3893 | AclService.update | train | public function update($quotaId, $aclId, AclBuilder $input, array $queryParams = [])
{
$response = $this->api->quotas()->acls()->update($quotaId, $aclId, $input->toArray(), $queryParams);
return new AclResponse($response);
} | php | {
"resource": ""
} |
q3894 | AclService.deleteAll | train | public function deleteAll($quotaId, array $queryParams = [])
{
$response = $this->api->quotas()->acls()->deleteAll($quotaId, $queryParams);
return new BaseResponse($response);
} | php | {
"resource": ""
} |
q3895 | CNabuMedioteca.getItems | train | public function getItems($force = false)
{
if (!$this->isBuiltIn() && ($this->nb_medioteca_item_list->isEmpty() || $force)) {
$this->nb_medioteca_item_list = CNabuMediotecaItem::getItemsForMedioteca($this);
}
return $this->nb_medioteca_item_list;
} | php | {
"resource": ""
} |
q3896 | CNabuMedioteca.getItem | train | public function getItem($nb_medioteca_item)
{
$nb_medioteca_item_id = nb_getMixedValue($nb_medioteca_item, 'nb_medioteca_item_id');
if (is_numeric($nb_medioteca_item_id) || nb_isValidGUID($nb_medioteca_item_id)) {
return $this->nb_medioteca_item_list->getItem($nb_medioteca_item_id);
... | php | {
"resource": ""
} |
q3897 | CNabuMedioteca.newItem | train | public function newItem(string $key = null)
{
$nb_medioteca_item = $this->isBuiltIn()
? new CNabuBuiltInMediotecaItem()
: new CNabuMediotecaItem()
;
$nb_medioteca_item->setKey($key);
return $this->addItemObject($nb_medioteca_item... | php | {
"resource": ""
} |
q3898 | CNabuMedioteca.findItemByURL | train | public function findItemByURL(string $url, $nb_language = null)
{
$retval = false;
$nb_language_id = nb_getMixedValue($nb_language, NABU_LANG_FIELD_ID);
$this->getItems()->iterate(
function ($key, CNabuMediotecaItem $nb_item)
use (&$retval, $url, $nb_language_id... | php | {
"resource": ""
} |
q3899 | CNabuMedioteca.addItemObject | train | public function addItemObject(CNabuMediotecaItem $nb_medioteca_item)
{
$nb_medioteca_item->setMedioteca($this);
return $this->nb_medioteca_item_list->addItem($nb_medioteca_item);
} | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.