repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
Smile-SA/elasticsuite | src/module-elasticsuite-core/Controller/Adminhtml/Search/Request/RelevanceConfig/Save.php | Save.getGroupsForSave | protected function getGroupsForSave()
{
$groups = $this->getRequest()->getPost('groups');
$files = $this->getRequest()->getFiles('groups');
if ($files && is_array($files)) {
/**
* Carefully merge $_FILES and $_POST information
* None of '+=' or 'array_m... | php | protected function getGroupsForSave()
{
$groups = $this->getRequest()->getPost('groups');
$files = $this->getRequest()->getFiles('groups');
if ($files && is_array($files)) {
/**
* Carefully merge $_FILES and $_POST information
* None of '+=' or 'array_m... | [
"protected",
"function",
"getGroupsForSave",
"(",
")",
"{",
"$",
"groups",
"=",
"$",
"this",
"->",
"getRequest",
"(",
")",
"->",
"getPost",
"(",
"'groups'",
")",
";",
"$",
"files",
"=",
"$",
"this",
"->",
"getRequest",
"(",
")",
"->",
"getFiles",
"(",
... | @SuppressWarnings(PHPMD.ElseExpression)
Get groups for save
@return array|null | [
"@SuppressWarnings",
"(",
"PHPMD",
".",
"ElseExpression",
")"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Controller/Adminhtml/Search/Request/RelevanceConfig/Save.php#L128-L151 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Controller/Adminhtml/Search/Request/RelevanceConfig/Save.php | Save.processNestedGroups | protected function processNestedGroups($group)
{
$data = [];
if (isset($group['fields']) && is_array($group['fields'])) {
foreach ($group['fields'] as $fieldName => $field) {
if (!empty($field['value'])) {
$data['fields'][$fieldName] = ['value' => $fi... | php | protected function processNestedGroups($group)
{
$data = [];
if (isset($group['fields']) && is_array($group['fields'])) {
foreach ($group['fields'] as $fieldName => $field) {
if (!empty($field['value'])) {
$data['fields'][$fieldName] = ['value' => $fi... | [
"protected",
"function",
"processNestedGroups",
"(",
"$",
"group",
")",
"{",
"$",
"data",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"group",
"[",
"'fields'",
"]",
")",
"&&",
"is_array",
"(",
"$",
"group",
"[",
"'fields'",
"]",
")",
")",
"{"... | Process nested groups
@param mixed $group The configuration groups
@return array | [
"Process",
"nested",
"groups"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Controller/Adminhtml/Search/Request/RelevanceConfig/Save.php#L160-L182 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Plugin/LayerPlugin.php | LayerPlugin.beforePrepareProductCollection | public function beforePrepareProductCollection(
\Magento\Catalog\Model\Layer $layer,
\Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection
) {
$this->setSortParams($layer, $collection);
} | php | public function beforePrepareProductCollection(
\Magento\Catalog\Model\Layer $layer,
\Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection
) {
$this->setSortParams($layer, $collection);
} | [
"public",
"function",
"beforePrepareProductCollection",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"Layer",
"$",
"layer",
",",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"ResourceModel",
"\\",
"Collection",
"\\",
"AbstractCollection",
... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php#L70-L75 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Plugin/LayerPlugin.php | LayerPlugin.setSortParams | private function setSortParams(
\Magento\Catalog\Model\Layer $layer,
\Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection
) {
$searchQuery = $this->queryFactory->get();
if (!$searchQuery->getQueryText() && $layer->getCurrentCategory()) {
$catego... | php | private function setSortParams(
\Magento\Catalog\Model\Layer $layer,
\Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection
) {
$searchQuery = $this->queryFactory->get();
if (!$searchQuery->getQueryText() && $layer->getCurrentCategory()) {
$catego... | [
"private",
"function",
"setSortParams",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"Layer",
"$",
"layer",
",",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"ResourceModel",
"\\",
"Collection",
"\\",
"AbstractCollection",
"$",
"collec... | Apply sort params to the collection.
@param \Magento\Catalog\Model\Layer $layer Catalog / search layer.
@param \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection $collection Product collection.
@return $this | [
"Apply",
"sort",
"params",
"to",
"the",
"collection",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Plugin/LayerPlugin.php#L85-L108 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Ui/Component/Listing/Column/OptimizerActions.php | OptimizerActions.prepareDataSource | public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
foreach ($dataSource['data']['items'] as & $item) {
$name = $this->getData('name');
if (isset($item['optimizer_id'])) {
$item[$name]['edit'] = [
... | php | public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
foreach ($dataSource['data']['items'] as & $item) {
$name = $this->getData('name');
if (isset($item['optimizer_id'])) {
$item[$name]['edit'] = [
... | [
"public",
"function",
"prepareDataSource",
"(",
"array",
"$",
"dataSource",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"dataSource",
"[",
"'data'",
"]",
"[",
"'items'",
"]",
")",
")",
"{",
"foreach",
"(",
"$",
"dataSource",
"[",
"'data'",
"]",
"[",
"'item... | Prepare Data Source
@param array $dataSource The data source
@return array | [
"Prepare",
"Data",
"Source"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Ui/Component/Listing/Column/OptimizerActions.php#L78-L103 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Request/Query/Builder/Boolean.php | Boolean.buildQuery | public function buildQuery(QueryInterface $query)
{
if ($query->getType() !== QueryInterface::TYPE_BOOL) {
throw new \InvalidArgumentException("Query builder : invalid query type {$query->getType()}");
}
$searchQuery = [];
foreach ($this->booleanClauses as $clause) {
... | php | public function buildQuery(QueryInterface $query)
{
if ($query->getType() !== QueryInterface::TYPE_BOOL) {
throw new \InvalidArgumentException("Query builder : invalid query type {$query->getType()}");
}
$searchQuery = [];
foreach ($this->booleanClauses as $clause) {
... | [
"public",
"function",
"buildQuery",
"(",
"QueryInterface",
"$",
"query",
")",
"{",
"if",
"(",
"$",
"query",
"->",
"getType",
"(",
")",
"!==",
"QueryInterface",
"::",
"TYPE_BOOL",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"Query builder... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Request/Query/Builder/Boolean.php#L45-L76 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Request/Query/Builder/Boolean.php | Boolean.getQueryClause | private function getQueryClause($query, $clause)
{
$queries = $query->getMust();
if ($clause == self::QUERY_CONDITION_NOT) {
$queries = $query->getMustNot();
} elseif ($clause == self::QUERY_CONDITION_SHOULD) {
$queries = $query->getShould();
}
retur... | php | private function getQueryClause($query, $clause)
{
$queries = $query->getMust();
if ($clause == self::QUERY_CONDITION_NOT) {
$queries = $query->getMustNot();
} elseif ($clause == self::QUERY_CONDITION_SHOULD) {
$queries = $query->getShould();
}
retur... | [
"private",
"function",
"getQueryClause",
"(",
"$",
"query",
",",
"$",
"clause",
")",
"{",
"$",
"queries",
"=",
"$",
"query",
"->",
"getMust",
"(",
")",
";",
"if",
"(",
"$",
"clause",
"==",
"self",
"::",
"QUERY_CONDITION_NOT",
")",
"{",
"$",
"queries",
... | Return the list of queries associated to a clause.
@param QueryInterface $query Bool query.
@param string $clause Current clause (must, should, must_not).
@return QueryInterface[] | [
"Return",
"the",
"list",
"of",
"queries",
"associated",
"to",
"a",
"clause",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Request/Query/Builder/Boolean.php#L86-L97 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Model/ResourceModel/Optimizer/Limitation.php | Limitation.saveLimitation | public function saveLimitation($optimizer, $limitationData)
{
$rows = [];
$optimizerId = (int) $optimizer->getId();
$this->getConnection()->delete(
$this->getMainTable(),
$this->getConnection()->quoteInto(OptimizerInterface::OPTIMIZER_ID . " = ?", $optimizerId... | php | public function saveLimitation($optimizer, $limitationData)
{
$rows = [];
$optimizerId = (int) $optimizer->getId();
$this->getConnection()->delete(
$this->getMainTable(),
$this->getConnection()->quoteInto(OptimizerInterface::OPTIMIZER_ID . " = ?", $optimizerId... | [
"public",
"function",
"saveLimitation",
"(",
"$",
"optimizer",
",",
"$",
"limitationData",
")",
"{",
"$",
"rows",
"=",
"[",
"]",
";",
"$",
"optimizerId",
"=",
"(",
"int",
")",
"$",
"optimizer",
"->",
"getId",
"(",
")",
";",
"$",
"this",
"->",
"getCon... | Save limitation data for a given optimizer.
@param OptimizerInterface $optimizer The optimizer.
@param array $limitationData An array containing limitation data to save.
@return bool
@throws \Magento\Framework\Exception\LocalizedException | [
"Save",
"limitation",
"data",
"for",
"a",
"given",
"optimizer",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Model/ResourceModel/Optimizer/Limitation.php#L85-L107 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Model/ResourceModel/Optimizer/Limitation.php | Limitation.getLimitationData | private function getLimitationData(OptimizerInterface $optimizer, $column)
{
$select = $this->getConnection()
->select()
->from($this->getMainTable(), $column)
->where($this->getConnection()->quoteInto(OptimizerInterface::OPTIMIZER_ID . " = ?", (int) $optimizer->getId()))... | php | private function getLimitationData(OptimizerInterface $optimizer, $column)
{
$select = $this->getConnection()
->select()
->from($this->getMainTable(), $column)
->where($this->getConnection()->quoteInto(OptimizerInterface::OPTIMIZER_ID . " = ?", (int) $optimizer->getId()))... | [
"private",
"function",
"getLimitationData",
"(",
"OptimizerInterface",
"$",
"optimizer",
",",
"$",
"column",
")",
"{",
"$",
"select",
"=",
"$",
"this",
"->",
"getConnection",
"(",
")",
"->",
"select",
"(",
")",
"->",
"from",
"(",
"$",
"this",
"->",
"getM... | Get Limitation data for a given optimizer.
@param OptimizerInterface $optimizer The optimizer
@param string $column The column to fetch
@return array | [
"Get",
"Limitation",
"data",
"for",
"a",
"given",
"optimizer",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Model/ResourceModel/Optimizer/Limitation.php#L127-L135 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Model/ResourceModel/Optimizer/Limitation.php | Limitation.getApplicationData | private function getApplicationData($container, $column, $idValue)
{
$select = $this->getConnection()
->select()
->from(['o' => $this->getTable(OptimizerInterface::TABLE_NAME)], [OptimizerInterface::OPTIMIZER_ID])
->joinInner(
['osc' => $this->getTable(Opt... | php | private function getApplicationData($container, $column, $idValue)
{
$select = $this->getConnection()
->select()
->from(['o' => $this->getTable(OptimizerInterface::TABLE_NAME)], [OptimizerInterface::OPTIMIZER_ID])
->joinInner(
['osc' => $this->getTable(Opt... | [
"private",
"function",
"getApplicationData",
"(",
"$",
"container",
",",
"$",
"column",
",",
"$",
"idValue",
")",
"{",
"$",
"select",
"=",
"$",
"this",
"->",
"getConnection",
"(",
")",
"->",
"select",
"(",
")",
"->",
"from",
"(",
"[",
"'o'",
"=>",
"$... | Retrieve applicable optimizer ids for a given entity_id (could be a category_id or query_id).
@param string $container The search container to filter on (quick_search_container or catalog_view_container).
@param string $column The column to filter on (category_id or query_id).
@param int $idValue The id of ent... | [
"Retrieve",
"applicable",
"optimizer",
"ids",
"for",
"a",
"given",
"entity_id",
"(",
"could",
"be",
"a",
"category_id",
"or",
"query_id",
")",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Model/ResourceModel/Optimizer/Limitation.php#L147-L172 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Ui/Component/Listing/Column/YesNo.php | YesNo.prepareDataSource | public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
$config = $this->getConfiguration();
$name = $config['fieldName'] ?? $this->getName();
foreach ($dataSource['data']['items'] as & $item) {
$item[$name] = ($... | php | public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
$config = $this->getConfiguration();
$name = $config['fieldName'] ?? $this->getName();
foreach ($dataSource['data']['items'] as & $item) {
$item[$name] = ($... | [
"public",
"function",
"prepareDataSource",
"(",
"array",
"$",
"dataSource",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"dataSource",
"[",
"'data'",
"]",
"[",
"'items'",
"]",
")",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"getConfiguration",
"(",
")... | Convert boolean value to Yes/No text output.
@param mixed[] $dataSource The data source
@return mixed[] | [
"Convert",
"boolean",
"value",
"to",
"Yes",
"/",
"No",
"text",
"output",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Ui/Component/Listing/Column/YesNo.php#L32-L43 |
Smile-SA/elasticsuite | src/module-elasticsuite-thesaurus/Block/Adminhtml/Thesaurus.php | Thesaurus._construct | protected function _construct()
{
$this->_controller = 'thesaurus';
$this->_headerText = __('Thesaurus');
$this->_addButtonLabel = __('Add New Thesaurus');
parent::_construct();
} | php | protected function _construct()
{
$this->_controller = 'thesaurus';
$this->_headerText = __('Thesaurus');
$this->_addButtonLabel = __('Add New Thesaurus');
parent::_construct();
} | [
"protected",
"function",
"_construct",
"(",
")",
"{",
"$",
"this",
"->",
"_controller",
"=",
"'thesaurus'",
";",
"$",
"this",
"->",
"_headerText",
"=",
"__",
"(",
"'Thesaurus'",
")",
";",
"$",
"this",
"->",
"_addButtonLabel",
"=",
"__",
"(",
"'Add New Thes... | @SuppressWarnings(PHPMD.CamelCaseMethodName)
@return void | [
"@SuppressWarnings",
"(",
"PHPMD",
".",
"CamelCaseMethodName",
")"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-thesaurus/Block/Adminhtml/Thesaurus.php#L40-L47 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.createVirtualCategoriesAttributes | public function createVirtualCategoriesAttributes($eavSetup)
{
$eavSetup->addAttribute(
Category::ENTITY,
'is_virtual_category',
[
'type' => 'int',
'label' => 'Is virtual category',
'input' => null,
... | php | public function createVirtualCategoriesAttributes($eavSetup)
{
$eavSetup->addAttribute(
Category::ENTITY,
'is_virtual_category',
[
'type' => 'int',
'label' => 'Is virtual category',
'input' => null,
... | [
"public",
"function",
"createVirtualCategoriesAttributes",
"(",
"$",
"eavSetup",
")",
"{",
"$",
"eavSetup",
"->",
"addAttribute",
"(",
"Category",
"::",
"ENTITY",
",",
"'is_virtual_category'",
",",
"[",
"'type'",
"=>",
"'int'",
",",
"'label'",
"=>",
"'Is virtual c... | Create virtual categories attributes.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup | [
"Create",
"virtual",
"categories",
"attributes",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L94-L155 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.updateVirtualCategoryRootTypeToInt | public function updateVirtualCategoryRootTypeToInt(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$setup = $eavSetup->getSetup();
// Fix the attribute type.
$eavSetup->updateAttribute(Category::ENTITY, 'virtual_category_root', 'backend_type', 'int');
// Retrieve information about the att... | php | public function updateVirtualCategoryRootTypeToInt(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$setup = $eavSetup->getSetup();
// Fix the attribute type.
$eavSetup->updateAttribute(Category::ENTITY, 'virtual_category_root', 'backend_type', 'int');
// Retrieve information about the att... | [
"public",
"function",
"updateVirtualCategoryRootTypeToInt",
"(",
"\\",
"Magento",
"\\",
"Eav",
"\\",
"Setup",
"\\",
"EavSetup",
"$",
"eavSetup",
")",
"{",
"$",
"setup",
"=",
"$",
"eavSetup",
"->",
"getSetup",
"(",
")",
";",
"// Fix the attribute type.",
"$",
"... | Migration from 1.0.0 to 1.1.0 :
- Updating the attribute virtual_category_root from type varchar to type int
- Updating the value of the attribute from 'category/13' to '13.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
@return $this | [
"Migration",
"from",
"1",
".",
"0",
".",
"0",
"to",
"1",
".",
"1",
".",
"0",
":",
"-",
"Updating",
"the",
"attribute",
"virtual_category_root",
"from",
"type",
"varchar",
"to",
"type",
"int",
"-",
"Updating",
"the",
"value",
"of",
"the",
"attribute",
"... | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L166-L207 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.updateVirtualCategoryRootDefaultValue | public function updateVirtualCategoryRootDefaultValue(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$setup = $eavSetup->getSetup();
// Fix the attribute default value.
$eavSetup->updateAttribute(Category::ENTITY, 'virtual_category_root', 'default_value', null);
// Retrieve information a... | php | public function updateVirtualCategoryRootDefaultValue(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$setup = $eavSetup->getSetup();
// Fix the attribute default value.
$eavSetup->updateAttribute(Category::ENTITY, 'virtual_category_root', 'default_value', null);
// Retrieve information a... | [
"public",
"function",
"updateVirtualCategoryRootDefaultValue",
"(",
"\\",
"Magento",
"\\",
"Eav",
"\\",
"Setup",
"\\",
"EavSetup",
"$",
"eavSetup",
")",
"{",
"$",
"setup",
"=",
"$",
"eavSetup",
"->",
"getSetup",
"(",
")",
";",
"// Fix the attribute default value."... | Migration from 1.4.0 to 1.4.1 :
- Updating the attribute virtual_category_root default value from 0 to NULL
- Deleting the attribute storage table rows with 0 as value
(new default value of NULL means no rows in storage table for newly created categories)
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
... | [
"Migration",
"from",
"1",
".",
"4",
".",
"0",
"to",
"1",
".",
"4",
".",
"1",
":",
"-",
"Updating",
"the",
"attribute",
"virtual_category_root",
"default",
"value",
"from",
"0",
"to",
"NULL",
"-",
"Deleting",
"the",
"attribute",
"storage",
"table",
"rows"... | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L219-L241 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.createPositionTable | public function createPositionTable(SchemaSetupInterface $setup)
{
/**
* Create table 'smile_virtualcategory_catalog_category_product_position'
*/
$tableName = 'smile_virtualcategory_catalog_category_product_position';
$table = $setup->getConnection()
->newTable... | php | public function createPositionTable(SchemaSetupInterface $setup)
{
/**
* Create table 'smile_virtualcategory_catalog_category_product_position'
*/
$tableName = 'smile_virtualcategory_catalog_category_product_position';
$table = $setup->getConnection()
->newTable... | [
"public",
"function",
"createPositionTable",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"/**\n * Create table 'smile_virtualcategory_catalog_category_product_position'\n */",
"$",
"tableName",
"=",
"'smile_virtualcategory_catalog_category_product_position'",
";"... | Create table containing position of products in virtual categories.
@param SchemaSetupInterface $setup Schema Setup Interface | [
"Create",
"table",
"containing",
"position",
"of",
"products",
"in",
"virtual",
"categories",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L248-L316 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.addBlacklistColumnToPositionTable | public function addBlacklistColumnToPositionTable(SchemaSetupInterface $setup)
{
$setup->getConnection()->addColumn(
$setup->getTable('smile_virtualcategory_catalog_category_product_position'),
'is_blacklisted',
[
'type' => \Magento\Framework\DB\Ddl\Ta... | php | public function addBlacklistColumnToPositionTable(SchemaSetupInterface $setup)
{
$setup->getConnection()->addColumn(
$setup->getTable('smile_virtualcategory_catalog_category_product_position'),
'is_blacklisted',
[
'type' => \Magento\Framework\DB\Ddl\Ta... | [
"public",
"function",
"addBlacklistColumnToPositionTable",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"setup",
"->",
"getConnection",
"(",
")",
"->",
"addColumn",
"(",
"$",
"setup",
"->",
"getTable",
"(",
"'smile_virtualcategory_catalog_category_product_p... | Add 'is_blacklisted' column to 'smile_virtualcategory_catalog_category_product_position'.
@param \Magento\Framework\Setup\SchemaSetupInterface $setup Setup interface | [
"Add",
"is_blacklisted",
"column",
"to",
"smile_virtualcategory_catalog_category_product_position",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L323-L335 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.setNullablePositionColumn | public function setNullablePositionColumn(SchemaSetupInterface $setup)
{
$setup->getConnection()->modifyColumn(
$setup->getTable('smile_virtualcategory_catalog_category_product_position'),
'position',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_I... | php | public function setNullablePositionColumn(SchemaSetupInterface $setup)
{
$setup->getConnection()->modifyColumn(
$setup->getTable('smile_virtualcategory_catalog_category_product_position'),
'position',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_I... | [
"public",
"function",
"setNullablePositionColumn",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"setup",
"->",
"getConnection",
"(",
")",
"->",
"modifyColumn",
"(",
"$",
"setup",
"->",
"getTable",
"(",
"'smile_virtualcategory_catalog_category_product_positi... | Set the 'position' column of 'smile_virtualcategory_catalog_category_product_position' to nullable=true.
@param \Magento\Framework\Setup\SchemaSetupInterface $setup Setup interface | [
"Set",
"the",
"position",
"column",
"of",
"smile_virtualcategory_catalog_category_product_position",
"to",
"nullable",
"=",
"true",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L342-L353 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.addStoreIdColumnToPositionTable | public function addStoreIdColumnToPositionTable(SchemaSetupInterface $setup)
{
$tableName = $setup->getTable('smile_virtualcategory_catalog_category_product_position');
$setup->getConnection()->addColumn(
$tableName,
'store_id',
[
'type' => \M... | php | public function addStoreIdColumnToPositionTable(SchemaSetupInterface $setup)
{
$tableName = $setup->getTable('smile_virtualcategory_catalog_category_product_position');
$setup->getConnection()->addColumn(
$tableName,
'store_id',
[
'type' => \M... | [
"public",
"function",
"addStoreIdColumnToPositionTable",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"tableName",
"=",
"$",
"setup",
"->",
"getTable",
"(",
"'smile_virtualcategory_catalog_category_product_position'",
")",
";",
"$",
"setup",
"->",
"getConne... | Add 'store_id' column to 'smile_virtualcategory_catalog_category_product_position'
and make it part of the table compound primary key.
@param \Magento\Framework\Setup\SchemaSetupInterface $setup Setup interface | [
"Add",
"store_id",
"column",
"to",
"smile_virtualcategory_catalog_category_product_position",
"and",
"make",
"it",
"part",
"of",
"the",
"table",
"compound",
"primary",
"key",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L361-L395 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.updateVirtualRuleBackend | public function updateVirtualRuleBackend(\Magento\Eav\Setup\EavSetup $eavSetup)
{
// Fix the attribute backend model.
$eavSetup->updateAttribute(
Category::ENTITY,
'virtual_rule',
'backend_model',
null
);
} | php | public function updateVirtualRuleBackend(\Magento\Eav\Setup\EavSetup $eavSetup)
{
// Fix the attribute backend model.
$eavSetup->updateAttribute(
Category::ENTITY,
'virtual_rule',
'backend_model',
null
);
} | [
"public",
"function",
"updateVirtualRuleBackend",
"(",
"\\",
"Magento",
"\\",
"Eav",
"\\",
"Setup",
"\\",
"EavSetup",
"$",
"eavSetup",
")",
"{",
"// Fix the attribute backend model.",
"$",
"eavSetup",
"->",
"updateAttribute",
"(",
"Category",
"::",
"ENTITY",
",",
... | Remove the backend model of the 'virtual_rule' attribute.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
@return void | [
"Remove",
"the",
"backend",
"model",
"of",
"the",
"virtual_rule",
"attribute",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L404-L413 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.convertSerializedRulesToJson | public function convertSerializedRulesToJson(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$setup = $eavSetup->getSetup();
$fieldDataConverter = $this->fieldDataConverterFactory->create(
\Magento\Framework\DB\DataConverter\SerializedToJson::class
);
$attributeId = $eavSet... | php | public function convertSerializedRulesToJson(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$setup = $eavSetup->getSetup();
$fieldDataConverter = $this->fieldDataConverterFactory->create(
\Magento\Framework\DB\DataConverter\SerializedToJson::class
);
$attributeId = $eavSet... | [
"public",
"function",
"convertSerializedRulesToJson",
"(",
"\\",
"Magento",
"\\",
"Eav",
"\\",
"Setup",
"\\",
"EavSetup",
"$",
"eavSetup",
")",
"{",
"$",
"setup",
"=",
"$",
"eavSetup",
"->",
"getSetup",
"(",
")",
";",
"$",
"fieldDataConverter",
"=",
"$",
"... | Upgrade legacy serialized data to JSON data.
Targets :
- the catalog_category_entity_text for the virtual_rule attribute only
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV Setup
@return void | [
"Upgrade",
"legacy",
"serialized",
"data",
"to",
"JSON",
"data",
".",
"Targets",
":",
"-",
"the",
"catalog_category_entity_text",
"for",
"the",
"virtual_rule",
"attribute",
"only"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L424-L449 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.addUseStorePositionsAttribute | public function addUseStorePositionsAttribute(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$eavSetup->addAttribute(
Category::ENTITY,
'use_store_positions',
[
'type' => 'int',
'input' => 'select',
'source' => 'Mag... | php | public function addUseStorePositionsAttribute(\Magento\Eav\Setup\EavSetup $eavSetup)
{
$eavSetup->addAttribute(
Category::ENTITY,
'use_store_positions',
[
'type' => 'int',
'input' => 'select',
'source' => 'Mag... | [
"public",
"function",
"addUseStorePositionsAttribute",
"(",
"\\",
"Magento",
"\\",
"Eav",
"\\",
"Setup",
"\\",
"EavSetup",
"$",
"eavSetup",
")",
"{",
"$",
"eavSetup",
"->",
"addAttribute",
"(",
"Category",
"::",
"ENTITY",
",",
"'use_store_positions'",
",",
"[",
... | Add the attribute handling the per-store merchandiser
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV Setup
@return void | [
"Add",
"the",
"attribute",
"handling",
"the",
"per",
"-",
"store",
"merchandiser"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L458-L480 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php | VirtualCategorySetup.reindexFlatCategories | private function reindexFlatCategories()
{
if ($this->flatCategoryIndexState->isFlatEnabled()) {
$flatCategoryIndexer = $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Category\Flat\State::INDEXER_ID);
$flatCategoryIndexer->reindexAll();
}
} | php | private function reindexFlatCategories()
{
if ($this->flatCategoryIndexState->isFlatEnabled()) {
$flatCategoryIndexer = $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Category\Flat\State::INDEXER_ID);
$flatCategoryIndexer->reindexAll();
}
} | [
"private",
"function",
"reindexFlatCategories",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"flatCategoryIndexState",
"->",
"isFlatEnabled",
"(",
")",
")",
"{",
"$",
"flatCategoryIndexer",
"=",
"$",
"this",
"->",
"indexerRegistry",
"->",
"get",
"(",
"\\",
"... | Process full reindexing of flat categories if enabled and not scheduled. | [
"Process",
"full",
"reindexing",
"of",
"flat",
"categories",
"if",
"enabled",
"and",
"not",
"scheduled",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Setup/VirtualCategorySetup.php#L485-L491 |
Smile-SA/elasticsuite | src/module-elasticsuite-thesaurus/Block/Adminhtml/Thesaurus/Renderer/AbstractRenderer.php | AbstractRenderer.renderCellTemplate | public function renderCellTemplate($columnName)
{
if ($columnName == 'term_id' && isset($this->_columns[$columnName])) {
$element = $this->elementFactory->create('hidden');
$element->setId("term_id")->setName("term_id");
$element->setForm($this->getForm())
... | php | public function renderCellTemplate($columnName)
{
if ($columnName == 'term_id' && isset($this->_columns[$columnName])) {
$element = $this->elementFactory->create('hidden');
$element->setId("term_id")->setName("term_id");
$element->setForm($this->getForm())
... | [
"public",
"function",
"renderCellTemplate",
"(",
"$",
"columnName",
")",
"{",
"if",
"(",
"$",
"columnName",
"==",
"'term_id'",
"&&",
"isset",
"(",
"$",
"this",
"->",
"_columns",
"[",
"$",
"columnName",
"]",
")",
")",
"{",
"$",
"element",
"=",
"$",
"thi... | Render array cell for JS template
@param string $columnName The column name
@return string | [
"Render",
"array",
"cell",
"for",
"JS",
"template"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-thesaurus/Block/Adminhtml/Thesaurus/Renderer/AbstractRenderer.php#L57-L80 |
Smile-SA/elasticsuite | src/module-elasticsuite-thesaurus/Block/Adminhtml/Thesaurus/Renderer/AbstractRenderer.php | AbstractRenderer.render | public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
if ($this->getValues()) {
$element->setValue($this->getValues());
}
$this->setElement($element);
return $this->toHtml();
} | php | public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
if ($this->getValues()) {
$element->setValue($this->getValues());
}
$this->setElement($element);
return $this->toHtml();
} | [
"public",
"function",
"render",
"(",
"\\",
"Magento",
"\\",
"Framework",
"\\",
"Data",
"\\",
"Form",
"\\",
"Element",
"\\",
"AbstractElement",
"$",
"element",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getValues",
"(",
")",
")",
"{",
"$",
"element",
"->"... | Render given element (return html of element)
@param \Magento\Framework\Data\Form\Element\AbstractElement $element The element
@return string | [
"Render",
"given",
"element",
"(",
"return",
"html",
"of",
"element",
")"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-thesaurus/Block/Adminhtml/Thesaurus/Renderer/AbstractRenderer.php#L89-L98 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/ContainerConfiguration/Aggregation/Resolver.php | Resolver.getContainerAggregations | public function getContainerAggregations(
ContainerConfigurationInterface $containerConfig,
$query = null,
$filters = [],
$queryFilters = []
) {
return $containerConfig->getAggregations($query, $filters, $queryFilters);
} | php | public function getContainerAggregations(
ContainerConfigurationInterface $containerConfig,
$query = null,
$filters = [],
$queryFilters = []
) {
return $containerConfig->getAggregations($query, $filters, $queryFilters);
} | [
"public",
"function",
"getContainerAggregations",
"(",
"ContainerConfigurationInterface",
"$",
"containerConfig",
",",
"$",
"query",
"=",
"null",
",",
"$",
"filters",
"=",
"[",
"]",
",",
"$",
"queryFilters",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"containerCo... | {@inheritdoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/Aggregation/Resolver.php#L31-L38 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Ui/Component/Optimizer/Form/DataProvider.php | DataProvider.getData | public function getData()
{
foreach ($this->getCollection()->getItems() as $itemId => $item) {
// Ensure optimizer config and rule get properly instantiated.
$item->getResource()->afterLoad($item);
$this->data[$itemId] = $item->toArray();
}
/** @var \Mage... | php | public function getData()
{
foreach ($this->getCollection()->getItems() as $itemId => $item) {
// Ensure optimizer config and rule get properly instantiated.
$item->getResource()->afterLoad($item);
$this->data[$itemId] = $item->toArray();
}
/** @var \Mage... | [
"public",
"function",
"getData",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getCollection",
"(",
")",
"->",
"getItems",
"(",
")",
"as",
"$",
"itemId",
"=>",
"$",
"item",
")",
"{",
"// Ensure optimizer config and rule get properly instantiated.",
"$",
"... | {@inheritdoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Ui/Component/Optimizer/Form/DataProvider.php#L67-L81 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Ui/Component/Optimizer/Form/DataProvider.php | DataProvider.getMeta | public function getMeta()
{
$this->meta = parent::getMeta();
/** @var \Magento\Ui\DataProvider\Modifier\ModifierInterface $modifier */
foreach ($this->modifierPool->getModifiersInstances() as $modifier) {
$this->meta = $modifier->modifyMeta($this->meta);
}
retur... | php | public function getMeta()
{
$this->meta = parent::getMeta();
/** @var \Magento\Ui\DataProvider\Modifier\ModifierInterface $modifier */
foreach ($this->modifierPool->getModifiersInstances() as $modifier) {
$this->meta = $modifier->modifyMeta($this->meta);
}
retur... | [
"public",
"function",
"getMeta",
"(",
")",
"{",
"$",
"this",
"->",
"meta",
"=",
"parent",
"::",
"getMeta",
"(",
")",
";",
"/** @var \\Magento\\Ui\\DataProvider\\Modifier\\ModifierInterface $modifier */",
"foreach",
"(",
"$",
"this",
"->",
"modifierPool",
"->",
"getM... | {@inheritdoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Ui/Component/Optimizer/Form/DataProvider.php#L86-L96 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php | Product.getSearchQuery | public function getSearchQuery($excludedCategories = [])
{
$searchQuery = parent::getSearchQuery();
if ($this->getAttribute() === 'category_ids') {
$searchQuery = $this->getCategorySearchQuery($excludedCategories);
}
return $searchQuery;
} | php | public function getSearchQuery($excludedCategories = [])
{
$searchQuery = parent::getSearchQuery();
if ($this->getAttribute() === 'category_ids') {
$searchQuery = $this->getCategorySearchQuery($excludedCategories);
}
return $searchQuery;
} | [
"public",
"function",
"getSearchQuery",
"(",
"$",
"excludedCategories",
"=",
"[",
"]",
")",
"{",
"$",
"searchQuery",
"=",
"parent",
"::",
"getSearchQuery",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getAttribute",
"(",
")",
"===",
"'category_ids'",
")",... | Build a search query for the current rule.
@param array $excludedCategories Categories excluded of query building (avoid infinite recursion).
@return QueryInterface | [
"Build",
"a",
"search",
"query",
"for",
"the",
"current",
"rule",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php#L94-L103 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php | Product.getValueElementChooserUrl | public function getValueElementChooserUrl()
{
$url = parent::getValueElementChooserUrl();
if ($this->getAttribute() === 'category_ids') {
$url = $this->getCategoryChooserUrl();
}
return $url;
} | php | public function getValueElementChooserUrl()
{
$url = parent::getValueElementChooserUrl();
if ($this->getAttribute() === 'category_ids') {
$url = $this->getCategoryChooserUrl();
}
return $url;
} | [
"public",
"function",
"getValueElementChooserUrl",
"(",
")",
"{",
"$",
"url",
"=",
"parent",
"::",
"getValueElementChooserUrl",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getAttribute",
"(",
")",
"===",
"'category_ids'",
")",
"{",
"$",
"url",
"=",
"$",
... | Retrieve value element chooser URL
@return string | [
"Retrieve",
"value",
"element",
"chooser",
"URL"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php#L110-L119 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php | Product.getCategorySearchQuery | private function getCategorySearchQuery($excludedCategories)
{
$categoryIds = array_diff(explode(',', $this->getValue()), $excludedCategories);
$subQueries = [];
foreach ($categoryIds as $categoryId) {
$subQuery = $this->getRule()->getCategorySearchQuery($categoryId, $excludedC... | php | private function getCategorySearchQuery($excludedCategories)
{
$categoryIds = array_diff(explode(',', $this->getValue()), $excludedCategories);
$subQueries = [];
foreach ($categoryIds as $categoryId) {
$subQuery = $this->getRule()->getCategorySearchQuery($categoryId, $excludedC... | [
"private",
"function",
"getCategorySearchQuery",
"(",
"$",
"excludedCategories",
")",
"{",
"$",
"categoryIds",
"=",
"array_diff",
"(",
"explode",
"(",
"','",
",",
"$",
"this",
"->",
"getValue",
"(",
")",
")",
",",
"$",
"excludedCategories",
")",
";",
"$",
... | Retrieve a query used to apply category filter rule.
@param array $excludedCategories Category excluded from the loading (avoid infinite loop in query
building when circular references are present).
@return QueryInterface | [
"Retrieve",
"a",
"query",
"used",
"to",
"apply",
"category",
"filter",
"rule",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php#L129-L150 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php | Product.getCategoryChooserUrl | private function getCategoryChooserUrl()
{
$url = 'catalog_rule/promo_widget/chooser/attribute/' . $this->getAttribute();
$chooserUrlParams = [];
if ($this->getJsFormObject()) {
$chooserUrlParams['form'] = $this->getJsFormObject();
}
$urlParams = $this->getUrlPa... | php | private function getCategoryChooserUrl()
{
$url = 'catalog_rule/promo_widget/chooser/attribute/' . $this->getAttribute();
$chooserUrlParams = [];
if ($this->getJsFormObject()) {
$chooserUrlParams['form'] = $this->getJsFormObject();
}
$urlParams = $this->getUrlPa... | [
"private",
"function",
"getCategoryChooserUrl",
"(",
")",
"{",
"$",
"url",
"=",
"'catalog_rule/promo_widget/chooser/attribute/'",
".",
"$",
"this",
"->",
"getAttribute",
"(",
")",
";",
"$",
"chooserUrlParams",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"this",
"->",
... | Get category chooser Url.
Might be contextualised according to current object data, if needed.
This will allow the Ajax call to the chooser to transfer current context (especially category_id).
@return string | [
"Get",
"category",
"chooser",
"Url",
".",
"Might",
"be",
"contextualised",
"according",
"to",
"current",
"object",
"data",
"if",
"needed",
".",
"This",
"will",
"allow",
"the",
"Ajax",
"call",
"to",
"the",
"chooser",
"to",
"transfer",
"current",
"context",
"(... | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Model/Rule/Condition/Product.php#L159-L176 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Search/Request/Product/Coverage/Provider.php | Provider.loadProductCounts | private function loadProductCounts()
{
$searchResponse = $this->searchEngine->search($this->request);
$this->countByAttributeSet = [];
$this->countByAttributeCode = [];
$this->size = $searchResponse->count();
$attributeSetIdBucket = $searchResponse->getAggr... | php | private function loadProductCounts()
{
$searchResponse = $this->searchEngine->search($this->request);
$this->countByAttributeSet = [];
$this->countByAttributeCode = [];
$this->size = $searchResponse->count();
$attributeSetIdBucket = $searchResponse->getAggr... | [
"private",
"function",
"loadProductCounts",
"(",
")",
"{",
"$",
"searchResponse",
"=",
"$",
"this",
"->",
"searchEngine",
"->",
"search",
"(",
"$",
"this",
"->",
"request",
")",
";",
"$",
"this",
"->",
"countByAttributeSet",
"=",
"[",
"]",
";",
"$",
"thi... | Compute calculation of product counts against the engine. | [
"Compute",
"calculation",
"of",
"product",
"counts",
"against",
"the",
"engine",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Search/Request/Product/Coverage/Provider.php#L104-L128 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Plugin/CatalogSearch/ResultPlugin.php | ResultPlugin.aroundExecute | public function aroundExecute(
\Magento\CatalogSearch\Controller\Result\Index $subject,
\Closure $proceed
) {
$result = $proceed();
if (!$subject->getResponse()->isRedirect() && $this->scopeConfig->isSetFlag(self::REDIRECT_SETTINGS_CONFIG_XML_FLAG)) {
$layer = $this... | php | public function aroundExecute(
\Magento\CatalogSearch\Controller\Result\Index $subject,
\Closure $proceed
) {
$result = $proceed();
if (!$subject->getResponse()->isRedirect() && $this->scopeConfig->isSetFlag(self::REDIRECT_SETTINGS_CONFIG_XML_FLAG)) {
$layer = $this... | [
"public",
"function",
"aroundExecute",
"(",
"\\",
"Magento",
"\\",
"CatalogSearch",
"\\",
"Controller",
"\\",
"Result",
"\\",
"Index",
"$",
"subject",
",",
"\\",
"Closure",
"$",
"proceed",
")",
"{",
"$",
"result",
"=",
"$",
"proceed",
"(",
")",
";",
"if"... | Process a redirect to the product page if there is only one result for a given search.
@param \Magento\CatalogSearch\Controller\Result\Index $subject The CatalogSearch Result Controller
@param \Closure $proceed The execute method
@return \Magento\Framework\Controller\ResultInterf... | [
"Process",
"a",
"redirect",
"to",
"the",
"product",
"page",
"if",
"there",
"is",
"only",
"one",
"result",
"for",
"a",
"given",
"search",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Plugin/CatalogSearch/ResultPlugin.php#L104-L137 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Plugin/CatalogSearch/ResultPlugin.php | ResultPlugin.addRedirectMessage | private function addRedirectMessage(ProductInterface $product)
{
$message = __("%1 is the only product matching your '%2' search.", $product->getName(), $this->helper->getEscapedQueryText());
$this->messageManager->addSuccessMessage($message);
} | php | private function addRedirectMessage(ProductInterface $product)
{
$message = __("%1 is the only product matching your '%2' search.", $product->getName(), $this->helper->getEscapedQueryText());
$this->messageManager->addSuccessMessage($message);
} | [
"private",
"function",
"addRedirectMessage",
"(",
"ProductInterface",
"$",
"product",
")",
"{",
"$",
"message",
"=",
"__",
"(",
"\"%1 is the only product matching your '%2' search.\"",
",",
"$",
"product",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"helper... | Append message to the customer session to inform he has been redirected
@param \Magento\Catalog\Api\Data\ProductInterface $product The product being redirected to. | [
"Append",
"message",
"to",
"the",
"customer",
"session",
"to",
"inform",
"he",
"has",
"been",
"redirected"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Plugin/CatalogSearch/ResultPlugin.php#L144-L148 |
Smile-SA/elasticsuite | src/module-elasticsuite-analytics/Model/Report/Session/DateFilterQueryProvider.php | DateFilterQueryProvider.getQuery | public function getQuery()
{
$range = $this->context->getDateRange();
$query = $this->queryFactory->create(
QueryInterface::TYPE_BOOL,
[
'must' => [
$this->queryFactory->create(
QueryInterface::TYPE_RANGE,
... | php | public function getQuery()
{
$range = $this->context->getDateRange();
$query = $this->queryFactory->create(
QueryInterface::TYPE_BOOL,
[
'must' => [
$this->queryFactory->create(
QueryInterface::TYPE_RANGE,
... | [
"public",
"function",
"getQuery",
"(",
")",
"{",
"$",
"range",
"=",
"$",
"this",
"->",
"context",
"->",
"getDateRange",
"(",
")",
";",
"$",
"query",
"=",
"$",
"this",
"->",
"queryFactory",
"->",
"create",
"(",
"QueryInterface",
"::",
"TYPE_BOOL",
",",
... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-analytics/Model/Report/Session/DateFilterQueryProvider.php#L54-L75 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.addCategoryNameSearchAttribute | public function addCategoryNameSearchAttribute($eavSetup)
{
// Installing the new attribute.
$eavSetup->addAttribute(
Category::ENTITY,
'use_name_in_product_search',
[
'type' => 'int',
'label' => 'Use category name in pro... | php | public function addCategoryNameSearchAttribute($eavSetup)
{
// Installing the new attribute.
$eavSetup->addAttribute(
Category::ENTITY,
'use_name_in_product_search',
[
'type' => 'int',
'label' => 'Use category name in pro... | [
"public",
"function",
"addCategoryNameSearchAttribute",
"(",
"$",
"eavSetup",
")",
"{",
"// Installing the new attribute.",
"$",
"eavSetup",
"->",
"addAttribute",
"(",
"Category",
"::",
"ENTITY",
",",
"'use_name_in_product_search'",
",",
"[",
"'type'",
"=>",
"'int'",
... | Create attribute on category to enable/disable name indexation for search.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
@return void | [
"Create",
"attribute",
"on",
"category",
"to",
"enable",
"/",
"disable",
"name",
"indexation",
"for",
"search",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L62-L88 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.updateCategoryIsAnchorAttribute | public function updateCategoryIsAnchorAttribute($eavSetup)
{
$eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'frontend_input', 'hidden');
$eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'source_model', null);
$categoryTreeRootId = \Magento\Catalog\Model\Category::TREE_ROO... | php | public function updateCategoryIsAnchorAttribute($eavSetup)
{
$eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'frontend_input', 'hidden');
$eavSetup->updateAttribute(Category::ENTITY, 'is_anchor', 'source_model', null);
$categoryTreeRootId = \Magento\Catalog\Model\Category::TREE_ROO... | [
"public",
"function",
"updateCategoryIsAnchorAttribute",
"(",
"$",
"eavSetup",
")",
"{",
"$",
"eavSetup",
"->",
"updateAttribute",
"(",
"Category",
"::",
"ENTITY",
",",
"'is_anchor'",
",",
"'frontend_input'",
",",
"'hidden'",
")",
";",
"$",
"eavSetup",
"->",
"up... | Update is anchor attribute (hidden frontend input, null source model, enabled by default).
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
@return void | [
"Update",
"is",
"anchor",
"attribute",
"(",
"hidden",
"frontend",
"input",
"null",
"source",
"model",
"enabled",
"by",
"default",
")",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L97-L103 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.updateDefaultValuesForNameAttributes | public function updateDefaultValuesForNameAttributes($eavSetup)
{
$setup = $eavSetup->getSetup();
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
$attributeIds = [
$eavSetup->getAttributeId(\Magento\Catalog\Model\Produ... | php | public function updateDefaultValuesForNameAttributes($eavSetup)
{
$setup = $eavSetup->getSetup();
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
$attributeIds = [
$eavSetup->getAttributeId(\Magento\Catalog\Model\Produ... | [
"public",
"function",
"updateDefaultValuesForNameAttributes",
"(",
"$",
"eavSetup",
")",
"{",
"$",
"setup",
"=",
"$",
"eavSetup",
"->",
"getSetup",
"(",
")",
";",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"="... | Update default values for the name field of category and product entities.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
@return void | [
"Update",
"default",
"values",
"for",
"the",
"name",
"field",
"of",
"category",
"and",
"product",
"entities",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L112-L130 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.addEavCatalogFields | public function addEavCatalogFields(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Append a column 'is_displayed_in_autocomplete' into the db.
$connection->addColumn(
$table,
'... | php | public function addEavCatalogFields(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Append a column 'is_displayed_in_autocomplete' into the db.
$connection->addColumn(
$table,
'... | [
"public",
"function",
"addEavCatalogFields",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"=",
"$",
"setup",
"->",
"getTable",
"(",
"'catalog_eav_attribute'",
")"... | Add custom fields to catalog_eav_attribute table.
@param SchemaSetupInterface $setup The setup interface
@return void | [
"Add",
"custom",
"fields",
"to",
"catalog_eav_attribute",
"table",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L139-L206 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.addIsSpellcheckedToSearchQuery | public function addIsSpellcheckedToSearchQuery(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('search_query');
$connection->addColumn(
$table,
'is_spellchecked',
[
'type' => \Magento... | php | public function addIsSpellcheckedToSearchQuery(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('search_query');
$connection->addColumn(
$table,
'is_spellchecked',
[
'type' => \Magento... | [
"public",
"function",
"addIsSpellcheckedToSearchQuery",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"=",
"$",
"setup",
"->",
"getTable",
"(",
"'search_query'",
"... | Append is spellchecked to the search query report table.
@param SchemaSetupInterface $setup The setup interface
@return void | [
"Append",
"is",
"spellchecked",
"to",
"the",
"search",
"query",
"report",
"table",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L215-L229 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.appendDecimalDisplayConfiguration | public function appendDecimalDisplayConfiguration(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Append a column 'display_pattern' into the db.
$connection->addColumn(
$table,
... | php | public function appendDecimalDisplayConfiguration(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Append a column 'display_pattern' into the db.
$connection->addColumn(
$table,
... | [
"public",
"function",
"appendDecimalDisplayConfiguration",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"=",
"$",
"setup",
"->",
"getTable",
"(",
"'catalog_eav_attr... | Append decimal display related columns to attribute table
@param \Magento\Framework\Setup\SchemaSetupInterface $setup The setup instance | [
"Append",
"decimal",
"display",
"related",
"columns",
"to",
"attribute",
"table"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L236-L265 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.removeIsUsedInAutocompleteField | public function removeIsUsedInAutocompleteField(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
$connection->dropColumn($table, 'is_used_in_autocomplete');
} | php | public function removeIsUsedInAutocompleteField(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
$connection->dropColumn($table, 'is_used_in_autocomplete');
} | [
"public",
"function",
"removeIsUsedInAutocompleteField",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"=",
"$",
"setup",
"->",
"getTable",
"(",
"'catalog_eav_attrib... | Remove the "is_used_in_autocomplete"
@param \Magento\Framework\Setup\SchemaSetupInterface $setup The setup instance | [
"Remove",
"the",
"is_used_in_autocomplete"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L272-L278 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.updateImageAttribute | public function updateImageAttribute($eavSetup)
{
$productImageAttributeId = $eavSetup->getAttributeId(\Magento\Catalog\Model\Product::ENTITY, 'image');
$setup = $eavSetup->getSetup();
$setup->getConnection()->update(
$setup->getTable('catalog_eav_attribute'),
['is_u... | php | public function updateImageAttribute($eavSetup)
{
$productImageAttributeId = $eavSetup->getAttributeId(\Magento\Catalog\Model\Product::ENTITY, 'image');
$setup = $eavSetup->getSetup();
$setup->getConnection()->update(
$setup->getTable('catalog_eav_attribute'),
['is_u... | [
"public",
"function",
"updateImageAttribute",
"(",
"$",
"eavSetup",
")",
"{",
"$",
"productImageAttributeId",
"=",
"$",
"eavSetup",
"->",
"getAttributeId",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"Product",
"::",
"ENTITY",
",",
"'image'",
"... | Update Product 'image' attribute and set it searchable.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup | [
"Update",
"Product",
"image",
"attribute",
"and",
"set",
"it",
"searchable",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L285-L295 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.updateCategorySearchableAttributes | public function updateCategorySearchableAttributes($eavSetup)
{
$setup = $eavSetup->getSetup();
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Set Name and description indexable and searchable.
$attributeIds = [
... | php | public function updateCategorySearchableAttributes($eavSetup)
{
$setup = $eavSetup->getSetup();
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Set Name and description indexable and searchable.
$attributeIds = [
... | [
"public",
"function",
"updateCategorySearchableAttributes",
"(",
"$",
"eavSetup",
")",
"{",
"$",
"setup",
"=",
"$",
"eavSetup",
"->",
"getSetup",
"(",
")",
";",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"=",
... | Update some categories attributes to have them indexed into ES.
Basically :
- Name (indexable and searchable
- Description (indexable and searchable)
- Url Path (indexable)
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup | [
"Update",
"some",
"categories",
"attributes",
"to",
"have",
"them",
"indexed",
"into",
"ES",
".",
"Basically",
":",
"-",
"Name",
"(",
"indexable",
"and",
"searchable",
"-",
"Description",
"(",
"indexable",
"and",
"searchable",
")",
"-",
"Url",
"Path",
"(",
... | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L307-L336 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.createCategoryFacetConfigurationTable | public function createCategoryFacetConfigurationTable(SchemaSetupInterface $setup)
{
// Create table 'smile_elasticsuitecatalog_category_filterable_attribute'.
$tableName = 'smile_elasticsuitecatalog_category_filterable_attribute';
$idField = $this->metadataPool->getMetadata(CategoryInterf... | php | public function createCategoryFacetConfigurationTable(SchemaSetupInterface $setup)
{
// Create table 'smile_elasticsuitecatalog_category_filterable_attribute'.
$tableName = 'smile_elasticsuitecatalog_category_filterable_attribute';
$idField = $this->metadataPool->getMetadata(CategoryInterf... | [
"public",
"function",
"createCategoryFacetConfigurationTable",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"// Create table 'smile_elasticsuitecatalog_category_filterable_attribute'.",
"$",
"tableName",
"=",
"'smile_elasticsuitecatalog_category_filterable_attribute'",
";",
"$"... | Create table containing configuration of facets for categories.
@param SchemaSetupInterface $setup Schema Setup Interface | [
"Create",
"table",
"containing",
"configuration",
"of",
"facets",
"for",
"categories",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L343-L417 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.addSortOrderMissingFields | public function addSortOrderMissingFields(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Append a column 'sort_order_asc_missing' into the db.
$connection->addColumn(
$table,
'... | php | public function addSortOrderMissingFields(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$table = $setup->getTable('catalog_eav_attribute');
// Append a column 'sort_order_asc_missing' into the db.
$connection->addColumn(
$table,
'... | [
"public",
"function",
"addSortOrderMissingFields",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"connection",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
";",
"$",
"table",
"=",
"$",
"setup",
"->",
"getTable",
"(",
"'catalog_eav_attribute'",... | Add "sort_order_asc_missing" and "sort_order_desc_missing" fields to catalog_eav_attribute table.
@param \Magento\Framework\Setup\SchemaSetupInterface $setup Schema Setup | [
"Add",
"sort_order_asc_missing",
"and",
"sort_order_desc_missing",
"fields",
"to",
"catalog_eav_attribute",
"table",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L521-L551 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Setup/CatalogSetup.php | CatalogSetup.updateCategoryAttributeDefaultValue | private function updateCategoryAttributeDefaultValue($eavSetup, $entityTypeId, $attributeId, $value, $excludedIds = [])
{
$setup = $eavSetup->getSetup();
$entityTable = $setup->getTable($eavSetup->getEntityType($entityTypeId, 'entity_table'));
$attributeTable = $eavSetup->getAttr... | php | private function updateCategoryAttributeDefaultValue($eavSetup, $entityTypeId, $attributeId, $value, $excludedIds = [])
{
$setup = $eavSetup->getSetup();
$entityTable = $setup->getTable($eavSetup->getEntityType($entityTypeId, 'entity_table'));
$attributeTable = $eavSetup->getAttr... | [
"private",
"function",
"updateCategoryAttributeDefaultValue",
"(",
"$",
"eavSetup",
",",
"$",
"entityTypeId",
",",
"$",
"attributeId",
",",
"$",
"value",
",",
"$",
"excludedIds",
"=",
"[",
"]",
")",
"{",
"$",
"setup",
"=",
"$",
"eavSetup",
"->",
"getSetup",
... | Update attribute value for an entity with a default value.
All existing values are erased by the new value.
@param \Magento\Eav\Setup\EavSetup $eavSetup EAV module Setup
@param integer|string $entityTypeId Target entity id.
@param integer|string $attributeId Target attribute id.
@param m... | [
"Update",
"attribute",
"value",
"for",
"an",
"entity",
"with",
"a",
"default",
"value",
".",
"All",
"existing",
"values",
"are",
"erased",
"by",
"the",
"new",
"value",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Setup/CatalogSetup.php#L566-L598 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Model/IndexManager.php | IndexManager.createIndexIfNotExists | public function createIndexIfNotExists(\Smile\ElasticsuiteCore\Api\Index\IndexInterface $index, $store)
{
if ($this->client->indexExists($index->getName()) === false) {
$indexSettings = array_merge($this->indexSettings->getCreateIndexSettings(), $this->indexSettings->getInstallIndexSettings());
... | php | public function createIndexIfNotExists(\Smile\ElasticsuiteCore\Api\Index\IndexInterface $index, $store)
{
if ($this->client->indexExists($index->getName()) === false) {
$indexSettings = array_merge($this->indexSettings->getCreateIndexSettings(), $this->indexSettings->getInstallIndexSettings());
... | [
"public",
"function",
"createIndexIfNotExists",
"(",
"\\",
"Smile",
"\\",
"ElasticsuiteCore",
"\\",
"Api",
"\\",
"Index",
"\\",
"IndexInterface",
"$",
"index",
",",
"$",
"store",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"client",
"->",
"indexExists",
"(",
"... | Create an event index if not exists.
@param \Smile\ElasticsuiteCore\Api\Index\IndexInterface $index Index.
@param int $store Store id.
@return void | [
"Create",
"an",
"event",
"index",
"if",
"not",
"exists",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Model/IndexManager.php#L70-L81 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Model/IndexManager.php | IndexManager.getIndicesDateBounds | public function getIndicesDateBounds($indexIdentifier, $storeId)
{
$bounds = [];
$indexAlias = $this->getIndexAlias($indexIdentifier, $storeId);
$indices = $this->client->getIndicesNameByAlias($indexAlias);
if (!empty($indices)) {
arsort($indices); // Sort horodated ... | php | public function getIndicesDateBounds($indexIdentifier, $storeId)
{
$bounds = [];
$indexAlias = $this->getIndexAlias($indexIdentifier, $storeId);
$indices = $this->client->getIndicesNameByAlias($indexAlias);
if (!empty($indices)) {
arsort($indices); // Sort horodated ... | [
"public",
"function",
"getIndicesDateBounds",
"(",
"$",
"indexIdentifier",
",",
"$",
"storeId",
")",
"{",
"$",
"bounds",
"=",
"[",
"]",
";",
"$",
"indexAlias",
"=",
"$",
"this",
"->",
"getIndexAlias",
"(",
"$",
"indexIdentifier",
",",
"$",
"storeId",
")",
... | Returns a [from, to] date range of available data based on horodated indices presence.
@param string $indexIdentifier Index identifier.
@param int $storeId Store id.
@return \DateTime[]
@SuppressWarnings(PHPMD.StaticAccess) | [
"Returns",
"a",
"[",
"from",
"to",
"]",
"date",
"range",
"of",
"available",
"data",
"based",
"on",
"horodated",
"indices",
"presence",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Model/IndexManager.php#L124-L143 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Model/IndexManager.php | IndexManager.getIndexName | public function getIndexName($indexIdentifier, $storeId, $date)
{
$indexAlias = $this->getIndexAlias($indexIdentifier, $storeId);
$date = substr($date, 0, 10);
return sprintf("%s_%s", $indexAlias, str_replace("-", "", $date));
} | php | public function getIndexName($indexIdentifier, $storeId, $date)
{
$indexAlias = $this->getIndexAlias($indexIdentifier, $storeId);
$date = substr($date, 0, 10);
return sprintf("%s_%s", $indexAlias, str_replace("-", "", $date));
} | [
"public",
"function",
"getIndexName",
"(",
"$",
"indexIdentifier",
",",
"$",
"storeId",
",",
"$",
"date",
")",
"{",
"$",
"indexAlias",
"=",
"$",
"this",
"->",
"getIndexAlias",
"(",
"$",
"indexIdentifier",
",",
"$",
"storeId",
")",
";",
"$",
"date",
"=",
... | Build index name from an event.
@param string $indexIdentifier Index identifier.
@param int $storeId Store id.
@param string $date Date.
@return string | [
"Build",
"index",
"name",
"from",
"an",
"event",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Model/IndexManager.php#L154-L160 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Response/QueryResponse.php | QueryResponse.prepareAggregations | private function prepareAggregations(array $searchResponse, AggregationFactory $aggregationFactory)
{
$aggregations = [];
if (isset($searchResponse['aggregations'])) {
$aggregations = $searchResponse['aggregations'];
}
$this->aggregations = $aggregationFactory->create($... | php | private function prepareAggregations(array $searchResponse, AggregationFactory $aggregationFactory)
{
$aggregations = [];
if (isset($searchResponse['aggregations'])) {
$aggregations = $searchResponse['aggregations'];
}
$this->aggregations = $aggregationFactory->create($... | [
"private",
"function",
"prepareAggregations",
"(",
"array",
"$",
"searchResponse",
",",
"AggregationFactory",
"$",
"aggregationFactory",
")",
"{",
"$",
"aggregations",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"searchResponse",
"[",
"'aggregations'",
"]"... | Build buckets from raw search response.
@param array $searchResponse Engine raw search response.
@param AggregationFactory $aggregationFactory Aggregation factory.
@return void | [
"Build",
"buckets",
"from",
"raw",
"search",
"response",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Response/QueryResponse.php#L96-L105 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Response/QueryResponse.php | QueryResponse.prepareDocuments | private function prepareDocuments(array $searchResponse, DocumentFactory $documentFactory)
{
$this->documents = [];
if (isset($searchResponse['hits'])) {
$hits = $searchResponse['hits']['hits'];
foreach ($hits as $hit) {
$this->documents[] = $documentFactory... | php | private function prepareDocuments(array $searchResponse, DocumentFactory $documentFactory)
{
$this->documents = [];
if (isset($searchResponse['hits'])) {
$hits = $searchResponse['hits']['hits'];
foreach ($hits as $hit) {
$this->documents[] = $documentFactory... | [
"private",
"function",
"prepareDocuments",
"(",
"array",
"$",
"searchResponse",
",",
"DocumentFactory",
"$",
"documentFactory",
")",
"{",
"$",
"this",
"->",
"documents",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"searchResponse",
"[",
"'hits'",
"]",
... | Build document list from the engine raw search response.
@param array $searchResponse Engine raw search response.
@param DocumentFactory $documentFactory Document factory
@return void | [
"Build",
"document",
"list",
"from",
"the",
"engine",
"raw",
"search",
"response",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Response/QueryResponse.php#L115-L128 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Search/Request/Product/Attribute/Aggregation/Category.php | Category.getAggregationData | public function getAggregationData(\Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute)
{
return [
'name' => 'categories',
'field' => 'category.category_id',
'type' => BucketInterface::TYPE_TERM,
'size' => 0,
];
} | php | public function getAggregationData(\Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute)
{
return [
'name' => 'categories',
'field' => 'category.category_id',
'type' => BucketInterface::TYPE_TERM,
'size' => 0,
];
} | [
"public",
"function",
"getAggregationData",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"ResourceModel",
"\\",
"Eav",
"\\",
"Attribute",
"$",
"attribute",
")",
"{",
"return",
"[",
"'name'",
"=>",
"'categories'",
",",
"'field'",
"=>",
"'category... | {@inheritdoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Search/Request/Product/Attribute/Aggregation/Category.php#L31-L39 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php | Product.loadAttributeOptions | public function loadAttributeOptions()
{
$attributes = [];
$productAttributes = [];
$this->_addSpecialAttributes($attributes);
foreach ($this->attributeList->getAttributeCollection() as $attribute) {
if ($attribute->getFrontendLabel()) {
$label = s... | php | public function loadAttributeOptions()
{
$attributes = [];
$productAttributes = [];
$this->_addSpecialAttributes($attributes);
foreach ($this->attributeList->getAttributeCollection() as $attribute) {
if ($attribute->getFrontendLabel()) {
$label = s... | [
"public",
"function",
"loadAttributeOptions",
"(",
")",
"{",
"$",
"attributes",
"=",
"[",
"]",
";",
"$",
"productAttributes",
"=",
"[",
"]",
";",
"$",
"this",
"->",
"_addSpecialAttributes",
"(",
"$",
"attributes",
")",
";",
"foreach",
"(",
"$",
"this",
"... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php#L103-L121 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php | Product.getValueElementType | public function getValueElementType()
{
$valueElementType = 'text';
if ($this->getAttribute() == 'attribute_set_id') {
$valueElementType = 'select';
} elseif (is_object($this->getAttributeObject())) {
$frontendInput = $this->getAttributeObject()->getFrontendInput();
... | php | public function getValueElementType()
{
$valueElementType = 'text';
if ($this->getAttribute() == 'attribute_set_id') {
$valueElementType = 'select';
} elseif (is_object($this->getAttributeObject())) {
$frontendInput = $this->getAttributeObject()->getFrontendInput();
... | [
"public",
"function",
"getValueElementType",
"(",
")",
"{",
"$",
"valueElementType",
"=",
"'text'",
";",
"if",
"(",
"$",
"this",
"->",
"getAttribute",
"(",
")",
"==",
"'attribute_set_id'",
")",
"{",
"$",
"valueElementType",
"=",
"'select'",
";",
"}",
"elseif... | Retrieve value element type
@return string | [
"Retrieve",
"value",
"element",
"type"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php#L188-L210 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php | Product.getValueName | public function getValueName()
{
$valueName = parent::getValueName();
if (in_array($this->getAttribute(), array_keys($this->specialAttributesProvider->getList()))) {
$valueName = $this->specialAttributesProvider->getAttribute($this->getAttribute())->getValueName();
}
re... | php | public function getValueName()
{
$valueName = parent::getValueName();
if (in_array($this->getAttribute(), array_keys($this->specialAttributesProvider->getList()))) {
$valueName = $this->specialAttributesProvider->getAttribute($this->getAttribute())->getValueName();
}
re... | [
"public",
"function",
"getValueName",
"(",
")",
"{",
"$",
"valueName",
"=",
"parent",
"::",
"getValueName",
"(",
")",
";",
"if",
"(",
"in_array",
"(",
"$",
"this",
"->",
"getAttribute",
"(",
")",
",",
"array_keys",
"(",
"$",
"this",
"->",
"specialAttribu... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php#L215-L224 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php | Product.getOperatorName | public function getOperatorName()
{
$operatorName = parent::getOperatorName();
if (in_array($this->getAttribute(), array_keys($this->specialAttributesProvider->getList()))) {
$operatorName = $this->specialAttributesProvider->getAttribute($this->getAttribute())->getOperatorName();
... | php | public function getOperatorName()
{
$operatorName = parent::getOperatorName();
if (in_array($this->getAttribute(), array_keys($this->specialAttributesProvider->getList()))) {
$operatorName = $this->specialAttributesProvider->getAttribute($this->getAttribute())->getOperatorName();
... | [
"public",
"function",
"getOperatorName",
"(",
")",
"{",
"$",
"operatorName",
"=",
"parent",
"::",
"getOperatorName",
"(",
")",
";",
"if",
"(",
"in_array",
"(",
"$",
"this",
"->",
"getAttribute",
"(",
")",
",",
"array_keys",
"(",
"$",
"this",
"->",
"speci... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php#L229-L238 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php | Product.getDefaultOperatorInputByType | public function getDefaultOperatorInputByType()
{
if (null === $this->_defaultOperatorInputByType) {
$this->_defaultOperatorInputByType = [
'string' => ['{}', '!{}'],
'numeric' => ['==', '!=', '>=', '>', '<=', '<'],
'date' => ['==',... | php | public function getDefaultOperatorInputByType()
{
if (null === $this->_defaultOperatorInputByType) {
$this->_defaultOperatorInputByType = [
'string' => ['{}', '!{}'],
'numeric' => ['==', '!=', '>=', '>', '<=', '<'],
'date' => ['==',... | [
"public",
"function",
"getDefaultOperatorInputByType",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"_defaultOperatorInputByType",
")",
"{",
"$",
"this",
"->",
"_defaultOperatorInputByType",
"=",
"[",
"'string'",
"=>",
"[",
"'{}'",
",",
"'!{}'",
... | Default operator input by type map getter
@return array | [
"Default",
"operator",
"input",
"by",
"type",
"map",
"getter"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php#L245-L262 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php | Product.getValue | public function getValue()
{
if (in_array($this->getAttribute(), array_keys($this->specialAttributesProvider->getList()))) {
$this->setData('value', $this->specialAttributesProvider->getAttribute($this->getAttribute())->getValue());
}
return $this->getData('value');
} | php | public function getValue()
{
if (in_array($this->getAttribute(), array_keys($this->specialAttributesProvider->getList()))) {
$this->setData('value', $this->specialAttributesProvider->getAttribute($this->getAttribute())->getValue());
}
return $this->getData('value');
} | [
"public",
"function",
"getValue",
"(",
")",
"{",
"if",
"(",
"in_array",
"(",
"$",
"this",
"->",
"getAttribute",
"(",
")",
",",
"array_keys",
"(",
"$",
"this",
"->",
"specialAttributesProvider",
"->",
"getList",
"(",
")",
")",
")",
")",
"{",
"$",
"this"... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php#L267-L274 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Autocomplete/Product/Collection/AttributeSelector.php | AttributeSelector.prepareCollection | public function prepareCollection(ProductCollection $collection)
{
$collection->addAttributeToSelect($this->attributes);
$collection->addPriceData();
return $collection;
} | php | public function prepareCollection(ProductCollection $collection)
{
$collection->addAttributeToSelect($this->attributes);
$collection->addPriceData();
return $collection;
} | [
"public",
"function",
"prepareCollection",
"(",
"ProductCollection",
"$",
"collection",
")",
"{",
"$",
"collection",
"->",
"addAttributeToSelect",
"(",
"$",
"this",
"->",
"attributes",
")",
";",
"$",
"collection",
"->",
"addPriceData",
"(",
")",
";",
"return",
... | Add standard attributes and price data to the collection.
@param ProductCollection $collection Product collection.
@return ProductCollection | [
"Add",
"standard",
"attributes",
"and",
"price",
"data",
"to",
"the",
"collection",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Autocomplete/Product/Collection/AttributeSelector.php#L50-L56 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Model/ResourceModel/Search/Request/RelevanceConfig.php | RelevanceConfig.saveConfig | public function saveConfig($path, $value, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = 'default')
{
$connection = $this->getConnection();
$select = $connection->select()->from(
$this->getMainTable()
)->where(
'path = ?',
$path
)-... | php | public function saveConfig($path, $value, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = 'default')
{
$connection = $this->getConnection();
$select = $connection->select()->from(
$this->getMainTable()
)->where(
'path = ?',
$path
)-... | [
"public",
"function",
"saveConfig",
"(",
"$",
"path",
",",
"$",
"value",
",",
"$",
"scope",
"=",
"ScopeConfigInterface",
"::",
"SCOPE_TYPE_DEFAULT",
",",
"$",
"scopeCode",
"=",
"'default'",
")",
"{",
"$",
"connection",
"=",
"$",
"this",
"->",
"getConnection"... | Save config value
@param string $path The config path
@param string $value The config value
@param string $scope The scope
@param string $scopeCode The scope Code
@return $this | [
"Save",
"config",
"value"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Model/ResourceModel/Search/Request/RelevanceConfig.php#L37-L66 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Model/ResourceModel/Search/Request/RelevanceConfig.php | RelevanceConfig.deleteConfig | public function deleteConfig($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = 'default')
{
$connection = $this->getConnection();
$connection->delete(
$this->getMainTable(),
[
$connection->quoteInto('path = ?', $path),
$con... | php | public function deleteConfig($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = 'default')
{
$connection = $this->getConnection();
$connection->delete(
$this->getMainTable(),
[
$connection->quoteInto('path = ?', $path),
$con... | [
"public",
"function",
"deleteConfig",
"(",
"$",
"path",
",",
"$",
"scope",
"=",
"ScopeConfigInterface",
"::",
"SCOPE_TYPE_DEFAULT",
",",
"$",
"scopeCode",
"=",
"'default'",
")",
"{",
"$",
"connection",
"=",
"$",
"this",
"->",
"getConnection",
"(",
")",
";",
... | Delete config value
@param string $path The config path
@param string $scope The scope
@param string $scopeCode The scope Code
@return $this | [
"Delete",
"config",
"value"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Model/ResourceModel/Search/Request/RelevanceConfig.php#L77-L90 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php | Full.getSearchableProducts | public function getSearchableProducts($storeId, $productIds = null, $fromId = 0, $limit = 1000)
{
$select = $this->getConnection()->select()
->from(['e' => $this->getTable('catalog_product_entity')]);
$this->addIsVisibleInStoreFilter($select, $storeId);
if ($productIds !== null... | php | public function getSearchableProducts($storeId, $productIds = null, $fromId = 0, $limit = 1000)
{
$select = $this->getConnection()->select()
->from(['e' => $this->getTable('catalog_product_entity')]);
$this->addIsVisibleInStoreFilter($select, $storeId);
if ($productIds !== null... | [
"public",
"function",
"getSearchableProducts",
"(",
"$",
"storeId",
",",
"$",
"productIds",
"=",
"null",
",",
"$",
"fromId",
"=",
"0",
",",
"$",
"limit",
"=",
"1000",
")",
"{",
"$",
"select",
"=",
"$",
"this",
"->",
"getConnection",
"(",
")",
"->",
"... | Load a bulk of product data.
@param int $storeId Store id.
@param string $productIds Product ids filter.
@param integer $fromId Load product with id greater than.
@param integer $limit Number of product to get loaded.
@return array | [
"Load",
"a",
"bulk",
"of",
"product",
"data",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php#L65-L81 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php | Full.getRelationsByChild | public function getRelationsByChild($childrenIds)
{
$metadata = $this->getEntityMetaData(\Magento\Catalog\Api\Data\ProductInterface::class);
$entityTable = $this->getTable($metadata->getEntityTable());
$relationTable = $this->getTable('catalog_product_relation');
$joinConditio... | php | public function getRelationsByChild($childrenIds)
{
$metadata = $this->getEntityMetaData(\Magento\Catalog\Api\Data\ProductInterface::class);
$entityTable = $this->getTable($metadata->getEntityTable());
$relationTable = $this->getTable('catalog_product_relation');
$joinConditio... | [
"public",
"function",
"getRelationsByChild",
"(",
"$",
"childrenIds",
")",
"{",
"$",
"metadata",
"=",
"$",
"this",
"->",
"getEntityMetaData",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Api",
"\\",
"Data",
"\\",
"ProductInterface",
"::",
"class",
")",
";",... | Retrieve products relations by childrens
@param array $childrenIds The product ids being reindexed
@return array | [
"Retrieve",
"products",
"relations",
"by",
"childrens"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php#L90-L103 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php | Full.addIsVisibleInStoreFilter | private function addIsVisibleInStoreFilter($select, $storeId)
{
$rootCategoryId = $this->getRootCategoryId($storeId);
$indexTable = $this->getCategoryProductIndexTable($storeId);
$visibilityJoinCond = $this->getConnection()->quoteInto(
'visibility.product_id = e.entity_id AN... | php | private function addIsVisibleInStoreFilter($select, $storeId)
{
$rootCategoryId = $this->getRootCategoryId($storeId);
$indexTable = $this->getCategoryProductIndexTable($storeId);
$visibilityJoinCond = $this->getConnection()->quoteInto(
'visibility.product_id = e.entity_id AN... | [
"private",
"function",
"addIsVisibleInStoreFilter",
"(",
"$",
"select",
",",
"$",
"storeId",
")",
"{",
"$",
"rootCategoryId",
"=",
"$",
"this",
"->",
"getRootCategoryId",
"(",
"$",
"storeId",
")",
";",
"$",
"indexTable",
"=",
"$",
"this",
"->",
"getCategoryP... | Filter the select to append only product visible into the catalog or search into the index.
Note : Magento put only enabled products that have the following
visibility into the catalog_category_product_index table :
- visible in catalog
- visible in search
- visible in catalog & search
So joining on the root category... | [
"Filter",
"the",
"select",
"to",
"append",
"only",
"product",
"visible",
"into",
"the",
"catalog",
"or",
"search",
"into",
"the",
"index",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php#L122-L137 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php | Full.getCategoryProductIndexTable | private function getCategoryProductIndexTable($storeId)
{
// Init table name as legacy table name.
$indexTable = $this->getTable('catalog_category_product_index');
try {
// Retrieve table name for the current store Id from the TableMaintainer.
$tableMaintainer = $thi... | php | private function getCategoryProductIndexTable($storeId)
{
// Init table name as legacy table name.
$indexTable = $this->getTable('catalog_category_product_index');
try {
// Retrieve table name for the current store Id from the TableMaintainer.
$tableMaintainer = $thi... | [
"private",
"function",
"getCategoryProductIndexTable",
"(",
"$",
"storeId",
")",
"{",
"// Init table name as legacy table name.",
"$",
"indexTable",
"=",
"$",
"this",
"->",
"getTable",
"(",
"'catalog_category_product_index'",
")",
";",
"try",
"{",
"// Retrieve table name ... | Retrieve category/product index table.
@param int $storeId The store Id
@return string | [
"Retrieve",
"category",
"/",
"product",
"index",
"table",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Action/Full.php#L146-L160 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.setCategory | public function setCategory(\Magento\Catalog\Api\Data\CategoryInterface $category)
{
$this->category = $category;
return $this;
} | php | public function setCategory(\Magento\Catalog\Api\Data\CategoryInterface $category)
{
$this->category = $category;
return $this;
} | [
"public",
"function",
"setCategory",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Api",
"\\",
"Data",
"\\",
"CategoryInterface",
"$",
"category",
")",
"{",
"$",
"this",
"->",
"category",
"=",
"$",
"category",
";",
"return",
"$",
"this",
";",
"}"
] | Set the current category for the collection.
@param \Magento\Catalog\Api\Data\CategoryInterface $category Current category.
@return \Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\FilterableAttribute\Category\Collection | [
"Set",
"the",
"current",
"category",
"for",
"the",
"collection",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L47-L52 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.applyCategory | public function applyCategory()
{
$this->joinCategoryData();
$this->removeAdditionalTableDuplicateFields();
$this->getSelect()->columns($this->getAdditionalColumns());
$subSelect = new \Zend_Db_Expr(sprintf("(%s)", (string) $this->getSelect()));
$this->_select = $this->getC... | php | public function applyCategory()
{
$this->joinCategoryData();
$this->removeAdditionalTableDuplicateFields();
$this->getSelect()->columns($this->getAdditionalColumns());
$subSelect = new \Zend_Db_Expr(sprintf("(%s)", (string) $this->getSelect()));
$this->_select = $this->getC... | [
"public",
"function",
"applyCategory",
"(",
")",
"{",
"$",
"this",
"->",
"joinCategoryData",
"(",
")",
";",
"$",
"this",
"->",
"removeAdditionalTableDuplicateFields",
"(",
")",
";",
"$",
"this",
"->",
"getSelect",
"(",
")",
"->",
"columns",
"(",
"$",
"this... | Apply current category settings to the collection.
@return \Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\FilterableAttribute\Category\Collection | [
"Apply",
"current",
"category",
"settings",
"to",
"the",
"collection",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L59-L70 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.setAttributeSetFilter | public function setAttributeSetFilter($setId)
{
if (is_array($setId)) {
if (!empty($setId)) {
$this->join(
['entity_attribute' => $this->getTable('eav_entity_attribute')],
'entity_attribute.attribute_id = main_table.attribute_id',
... | php | public function setAttributeSetFilter($setId)
{
if (is_array($setId)) {
if (!empty($setId)) {
$this->join(
['entity_attribute' => $this->getTable('eav_entity_attribute')],
'entity_attribute.attribute_id = main_table.attribute_id',
... | [
"public",
"function",
"setAttributeSetFilter",
"(",
"$",
"setId",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"setId",
")",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"setId",
")",
")",
"{",
"$",
"this",
"->",
"join",
"(",
"[",
"'entity_attribute'",... | Specify attribute set filter
@param array|int $setId Attribute Set Id(s)
@return $this | [
"Specify",
"attribute",
"set",
"filter"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L79-L101 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection._beforeLoad | protected function _beforeLoad()
{
parent::_beforeLoad();
if ($this->category && $this->category->getId()) {
$this->applyCategory();
}
} | php | protected function _beforeLoad()
{
parent::_beforeLoad();
if ($this->category && $this->category->getId()) {
$this->applyCategory();
}
} | [
"protected",
"function",
"_beforeLoad",
"(",
")",
"{",
"parent",
"::",
"_beforeLoad",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"category",
"&&",
"$",
"this",
"->",
"category",
"->",
"getId",
"(",
")",
")",
"{",
"$",
"this",
"->",
"applyCategory",
... | @SuppressWarnings(PHPMD.CamelCaseMethodName)
{@inheritDoc} | [
"@SuppressWarnings",
"(",
"PHPMD",
".",
"CamelCaseMethodName",
")"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L108-L114 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.joinCategoryData | private function joinCategoryData()
{
$table = $this->getTable(self::CATEGORY_FILTER_CONFIG_TABLE);
$joinCondition = [
'fal.attribute_id = main_table.attribute_id',
$this->getConnection()->quoteInto('fal.entity_id = ?', (int) $this->category->getId()),
];
$t... | php | private function joinCategoryData()
{
$table = $this->getTable(self::CATEGORY_FILTER_CONFIG_TABLE);
$joinCondition = [
'fal.attribute_id = main_table.attribute_id',
$this->getConnection()->quoteInto('fal.entity_id = ?', (int) $this->category->getId()),
];
$t... | [
"private",
"function",
"joinCategoryData",
"(",
")",
"{",
"$",
"table",
"=",
"$",
"this",
"->",
"getTable",
"(",
"self",
"::",
"CATEGORY_FILTER_CONFIG_TABLE",
")",
";",
"$",
"joinCondition",
"=",
"[",
"'fal.attribute_id = main_table.attribute_id'",
",",
"$",
"this... | Add the category data (left join on the table containing per category config).
@return \Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\FilterableAttribute\Category\Collection | [
"Add",
"the",
"category",
"data",
"(",
"left",
"join",
"on",
"the",
"table",
"containing",
"per",
"category",
"config",
")",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L121-L133 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.getAdditionalColumns | private function getAdditionalColumns()
{
$columns = ['facet_display_mode' => 'fal.facet_display_mode'];
foreach ($this->overridenColumns as $column) {
$columns[$column] = new \Zend_Db_Expr("COALESCE(fal.$column, additional_table.$column)");
$columns['use_default_' . $column... | php | private function getAdditionalColumns()
{
$columns = ['facet_display_mode' => 'fal.facet_display_mode'];
foreach ($this->overridenColumns as $column) {
$columns[$column] = new \Zend_Db_Expr("COALESCE(fal.$column, additional_table.$column)");
$columns['use_default_' . $column... | [
"private",
"function",
"getAdditionalColumns",
"(",
")",
"{",
"$",
"columns",
"=",
"[",
"'facet_display_mode'",
"=>",
"'fal.facet_display_mode'",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"overridenColumns",
"as",
"$",
"column",
")",
"{",
"$",
"columns",
"[... | List of additional columns added to the select.
@return array | [
"List",
"of",
"additional",
"columns",
"added",
"to",
"the",
"select",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L140-L154 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.getMaxPosition | private function getMaxPosition()
{
$fullTableName = $this->getResource()->getTable(self::CATEGORY_FILTER_CONFIG_TABLE);
$categoryPositionSelect = $this->getConnection()->select()
->from($fullTableName, [])
->columns(['category_max_position' => new \Zend_Db_Expr('MAX(position... | php | private function getMaxPosition()
{
$fullTableName = $this->getResource()->getTable(self::CATEGORY_FILTER_CONFIG_TABLE);
$categoryPositionSelect = $this->getConnection()->select()
->from($fullTableName, [])
->columns(['category_max_position' => new \Zend_Db_Expr('MAX(position... | [
"private",
"function",
"getMaxPosition",
"(",
")",
"{",
"$",
"fullTableName",
"=",
"$",
"this",
"->",
"getResource",
"(",
")",
"->",
"getTable",
"(",
"self",
"::",
"CATEGORY_FILTER_CONFIG_TABLE",
")",
";",
"$",
"categoryPositionSelect",
"=",
"$",
"this",
"->",... | Return the max attribute position configured for the current category.
@return int | [
"Return",
"the",
"max",
"attribute",
"position",
"configured",
"for",
"the",
"current",
"category",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L161-L170 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.removeAdditionalTableDuplicateFields | private function removeAdditionalTableDuplicateFields()
{
$columns = $this->getSelect()->getPart(\Zend_Db_Select::COLUMNS);
foreach ($columns as $idx => $column) {
if ($column[0] == 'additional_table' && $column[1] == "*") {
unset($columns[$idx]);
}
}... | php | private function removeAdditionalTableDuplicateFields()
{
$columns = $this->getSelect()->getPart(\Zend_Db_Select::COLUMNS);
foreach ($columns as $idx => $column) {
if ($column[0] == 'additional_table' && $column[1] == "*") {
unset($columns[$idx]);
}
}... | [
"private",
"function",
"removeAdditionalTableDuplicateFields",
"(",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"getSelect",
"(",
")",
"->",
"getPart",
"(",
"\\",
"Zend_Db_Select",
"::",
"COLUMNS",
")",
";",
"foreach",
"(",
"$",
"columns",
"as",
"$",
... | Clean collection select to remove duplicated fields.
@return \Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\FilterableAttribute\Category\Collection | [
"Clean",
"collection",
"select",
"to",
"remove",
"duplicated",
"fields",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L177-L194 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php | Collection.getAdditionalTableFields | private function getAdditionalTableFields()
{
$type = $this->eavConfig->getEntityType(\Magento\Catalog\Model\Product::ENTITY);
$table = $type->getAdditionalAttributeTable();
$fullTableName = $this->getResource()->getTable($table);
$tableDesc = $this->getConnection()->describeTable($... | php | private function getAdditionalTableFields()
{
$type = $this->eavConfig->getEntityType(\Magento\Catalog\Model\Product::ENTITY);
$table = $type->getAdditionalAttributeTable();
$fullTableName = $this->getResource()->getTable($table);
$tableDesc = $this->getConnection()->describeTable($... | [
"private",
"function",
"getAdditionalTableFields",
"(",
")",
"{",
"$",
"type",
"=",
"$",
"this",
"->",
"eavConfig",
"->",
"getEntityType",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"Product",
"::",
"ENTITY",
")",
";",
"$",
"table",
"=",
... | List of columns of the additional attribute config table without the overriden fields.
@return array | [
"List",
"of",
"columns",
"of",
"the",
"additional",
"attribute",
"config",
"table",
"without",
"the",
"overriden",
"fields",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/ResourceModel/Product/FilterableAttribute/Category/Collection.php#L201-L210 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Category/Filter/Provider.php | Provider.getQueryFilter | public function getQueryFilter(CategoryInterface $category)
{
$queryParams = ['field' => 'category.category_id', 'value' => $category->getId()];
$query = $this->queryFactory->create(QueryInterface::TYPE_TERM, $queryParams);
$nestedQueryParams = ['query' => $query, 'path' =>... | php | public function getQueryFilter(CategoryInterface $category)
{
$queryParams = ['field' => 'category.category_id', 'value' => $category->getId()];
$query = $this->queryFactory->create(QueryInterface::TYPE_TERM, $queryParams);
$nestedQueryParams = ['query' => $query, 'path' =>... | [
"public",
"function",
"getQueryFilter",
"(",
"CategoryInterface",
"$",
"category",
")",
"{",
"$",
"queryParams",
"=",
"[",
"'field'",
"=>",
"'category.category_id'",
",",
"'value'",
"=>",
"$",
"category",
"->",
"getId",
"(",
")",
"]",
";",
"$",
"query",
"=",... | Get query filter (Eg : to be used with addQueryFilter on fulltext collection)
@param \Magento\Catalog\Api\Data\CategoryInterface $category Category
@return QueryInterface | [
"Get",
"query",
"filter",
"(",
"Eg",
":",
"to",
"be",
"used",
"with",
"addQueryFilter",
"on",
"fulltext",
"collection",
")"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Category/Filter/Provider.php#L64-L71 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog-optimizer/Ui/Component/Optimizer/Form/Modifier/Preview.php | Preview.modifyMeta | public function modifyMeta(array $meta)
{
$config = [
'loadUrl' => $this->getPreviewUrl(),
'price_format' => $this->localeFormat->getPriceFormat(),
];
$meta['optimizer_preview_fieldset']['children']['optimizer_preview']['arguments']['data']['config'] = $config;
... | php | public function modifyMeta(array $meta)
{
$config = [
'loadUrl' => $this->getPreviewUrl(),
'price_format' => $this->localeFormat->getPriceFormat(),
];
$meta['optimizer_preview_fieldset']['children']['optimizer_preview']['arguments']['data']['config'] = $config;
... | [
"public",
"function",
"modifyMeta",
"(",
"array",
"$",
"meta",
")",
"{",
"$",
"config",
"=",
"[",
"'loadUrl'",
"=>",
"$",
"this",
"->",
"getPreviewUrl",
"(",
")",
",",
"'price_format'",
"=>",
"$",
"this",
"->",
"localeFormat",
"->",
"getPriceFormat",
"(",
... | {@inheritdoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog-optimizer/Ui/Component/Optimizer/Form/Modifier/Preview.php#L70-L80 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Layer/Filter/Decimal.php | Decimal.formatValue | private function formatValue($value)
{
$attribute = $this->getAttributeModel();
if ((int) $attribute->getDisplayPrecision() > 0) {
$locale = $this->localeResolver->getLocale();
$options = ['locale' => $locale, 'precision' => (int) $attribute->getDisplayPrecision()];
... | php | private function formatValue($value)
{
$attribute = $this->getAttributeModel();
if ((int) $attribute->getDisplayPrecision() > 0) {
$locale = $this->localeResolver->getLocale();
$options = ['locale' => $locale, 'precision' => (int) $attribute->getDisplayPrecision()];
... | [
"private",
"function",
"formatValue",
"(",
"$",
"value",
")",
"{",
"$",
"attribute",
"=",
"$",
"this",
"->",
"getAttributeModel",
"(",
")",
";",
"if",
"(",
"(",
"int",
")",
"$",
"attribute",
"->",
"getDisplayPrecision",
"(",
")",
">",
"0",
")",
"{",
... | Format value according to attribute display options
@param mixed $value The value to format
@return string | [
"Format",
"value",
"according",
"to",
"attribute",
"display",
"options"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Layer/Filter/Decimal.php#L117-L133 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Block/Variables/Page/Base.php | Base.getPageTypeIdentifier | public function getPageTypeIdentifier()
{
$request = $this->getRequest();
return $request->getModuleName() . '_' . $request->getControllerName() . '_' . $request->getActionName();
} | php | public function getPageTypeIdentifier()
{
$request = $this->getRequest();
return $request->getModuleName() . '_' . $request->getControllerName() . '_' . $request->getActionName();
} | [
"public",
"function",
"getPageTypeIdentifier",
"(",
")",
"{",
"$",
"request",
"=",
"$",
"this",
"->",
"getRequest",
"(",
")",
";",
"return",
"$",
"request",
"->",
"getModuleName",
"(",
")",
".",
"'_'",
".",
"$",
"request",
"->",
"getControllerName",
"(",
... | Page type identifier built from route (ex: catalog/product/view => catalog_product_view)
@return string | [
"Page",
"type",
"identifier",
"built",
"from",
"route",
"(",
"ex",
":",
"catalog",
"/",
"product",
"/",
"view",
"=",
">",
"catalog_product_view",
")"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Block/Variables/Page/Base.php#L84-L89 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Block/Variables/Page/Base.php | Base.getPageTypeLabel | public function getPageTypeLabel()
{
if (!$this->getData('page_type_label')) {
$label = '';
$identifier = $this->getPageTypeIdentifier();
$labelByIdentifier = $this->getPageTypeLabelMap();
if (isset($labelByIdentifier[$identifier])) {
... | php | public function getPageTypeLabel()
{
if (!$this->getData('page_type_label')) {
$label = '';
$identifier = $this->getPageTypeIdentifier();
$labelByIdentifier = $this->getPageTypeLabelMap();
if (isset($labelByIdentifier[$identifier])) {
... | [
"public",
"function",
"getPageTypeLabel",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"getData",
"(",
"'page_type_label'",
")",
")",
"{",
"$",
"label",
"=",
"''",
";",
"$",
"identifier",
"=",
"$",
"this",
"->",
"getPageTypeIdentifier",
"(",
")",
... | Human readable version of the page
@return string | [
"Human",
"readable",
"version",
"of",
"the",
"page"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Block/Variables/Page/Base.php#L96-L111 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Block/Variables/Page/Base.php | Base.getPageTypeLabelMap | private function getPageTypeLabelMap()
{
$labelByIdentifier = [];
$pageTypes = $this->pageTypeConfig->getPageTypes();
foreach ($pageTypes as $identifier => $pageType) {
$labelByIdentifier[$identifier] = $pageType['label'];
}
return $labelByIdentifier;
} | php | private function getPageTypeLabelMap()
{
$labelByIdentifier = [];
$pageTypes = $this->pageTypeConfig->getPageTypes();
foreach ($pageTypes as $identifier => $pageType) {
$labelByIdentifier[$identifier] = $pageType['label'];
}
return $labelByIdentifier;
} | [
"private",
"function",
"getPageTypeLabelMap",
"(",
")",
"{",
"$",
"labelByIdentifier",
"=",
"[",
"]",
";",
"$",
"pageTypes",
"=",
"$",
"this",
"->",
"pageTypeConfig",
"->",
"getPageTypes",
"(",
")",
";",
"foreach",
"(",
"$",
"pageTypes",
"as",
"$",
"identi... | Return the array of page labels from layout indexed by handle names.
@return array | [
"Return",
"the",
"array",
"of",
"page",
"labels",
"from",
"layout",
"indexed",
"by",
"handle",
"names",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Block/Variables/Page/Base.php#L118-L128 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Setup/UpgradeSchema.php | UpgradeSchema.upgrade | public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
if (version_compare($context->getVersion(), "1.1.0") < 0) {
$setup->startSetup();
$logTable = $setup->getConnection()->newTable($setup->getTable('elasticsuite_track... | php | public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
if (version_compare($context->getVersion(), "1.1.0") < 0) {
$setup->startSetup();
$logTable = $setup->getConnection()->newTable($setup->getTable('elasticsuite_track... | [
"public",
"function",
"upgrade",
"(",
"SchemaSetupInterface",
"$",
"setup",
",",
"ModuleContextInterface",
"$",
"context",
")",
"{",
"$",
"setup",
"->",
"startSetup",
"(",
")",
";",
"if",
"(",
"version_compare",
"(",
"$",
"context",
"->",
"getVersion",
"(",
... | Create table for the tracking module.
@param SchemaSetupInterface $setup The setup interface
@param ModuleContextInterface $context The module Context
@return void | [
"Create",
"table",
"for",
"the",
"tracking",
"module",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Setup/UpgradeSchema.php#L38-L83 |
Smile-SA/elasticsuite | src/module-elasticsuite-tracker/Setup/UpgradeSchema.php | UpgradeSchema.createCustomerLinkTable | private function createCustomerLinkTable(SchemaSetupInterface $setup)
{
$logTable = $setup->getConnection()->newTable($setup->getTable('elasticsuite_tracker_log_customer_link'))
->addColumn(
'customer_id',
\Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
... | php | private function createCustomerLinkTable(SchemaSetupInterface $setup)
{
$logTable = $setup->getConnection()->newTable($setup->getTable('elasticsuite_tracker_log_customer_link'))
->addColumn(
'customer_id',
\Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
... | [
"private",
"function",
"createCustomerLinkTable",
"(",
"SchemaSetupInterface",
"$",
"setup",
")",
"{",
"$",
"logTable",
"=",
"$",
"setup",
"->",
"getConnection",
"(",
")",
"->",
"newTable",
"(",
"$",
"setup",
"->",
"getTable",
"(",
"'elasticsuite_tracker_log_custo... | Create customer link table.
@param SchemaSetupInterface $setup Setup | [
"Create",
"customer",
"link",
"table",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-tracker/Setup/UpgradeSchema.php#L90-L129 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/PriceData.php | PriceData.addData | public function addData($storeId, array $indexData)
{
$priceData = $this->resourceModel->loadPriceData($storeId, array_keys($indexData));
foreach ($priceData as $priceDataRow) {
$productId = (int) $priceDataRow['entity_id'];
$productTypeId = $indexData[$productId]['type_... | php | public function addData($storeId, array $indexData)
{
$priceData = $this->resourceModel->loadPriceData($storeId, array_keys($indexData));
foreach ($priceData as $priceDataRow) {
$productId = (int) $priceDataRow['entity_id'];
$productTypeId = $indexData[$productId]['type_... | [
"public",
"function",
"addData",
"(",
"$",
"storeId",
",",
"array",
"$",
"indexData",
")",
"{",
"$",
"priceData",
"=",
"$",
"this",
"->",
"resourceModel",
"->",
"loadPriceData",
"(",
"$",
"storeId",
",",
"array_keys",
"(",
"$",
"indexData",
")",
")",
";"... | Add price data to the index data.
{@inheritdoc} | [
"Add",
"price",
"data",
"to",
"the",
"index",
"data",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/PriceData.php#L56-L84 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/PriceData.php | PriceData.getPriceDataReader | private function getPriceDataReader($typeId)
{
$priceModifier = $this->priceReaderPool['default'];
if (isset($this->priceReaderPool[$typeId])) {
$priceModifier = $this->priceReaderPool[$typeId];
}
return $priceModifier;
} | php | private function getPriceDataReader($typeId)
{
$priceModifier = $this->priceReaderPool['default'];
if (isset($this->priceReaderPool[$typeId])) {
$priceModifier = $this->priceReaderPool[$typeId];
}
return $priceModifier;
} | [
"private",
"function",
"getPriceDataReader",
"(",
"$",
"typeId",
")",
"{",
"$",
"priceModifier",
"=",
"$",
"this",
"->",
"priceReaderPool",
"[",
"'default'",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"priceReaderPool",
"[",
"$",
"typeId",
"]",
... | Retur
@param string $typeId Product type id.
@return PriceData\PriceDataReaderInterface | [
"Retur",
"@param",
"string",
"$typeId",
"Product",
"type",
"id",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/PriceData.php#L92-L101 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/Aggregation/PipelineFactory.php | PipelineFactory.create | public function create($pipelineType, $pipelineParams)
{
if (!isset($this->factories[$pipelineType])) {
throw new \LogicException("No factory found for pipeline aggregation of type {$pipelineType}");
}
return $this->factories[$pipelineType]->create($pipelineParams);
} | php | public function create($pipelineType, $pipelineParams)
{
if (!isset($this->factories[$pipelineType])) {
throw new \LogicException("No factory found for pipeline aggregation of type {$pipelineType}");
}
return $this->factories[$pipelineType]->create($pipelineParams);
} | [
"public",
"function",
"create",
"(",
"$",
"pipelineType",
",",
"$",
"pipelineParams",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"factories",
"[",
"$",
"pipelineType",
"]",
")",
")",
"{",
"throw",
"new",
"\\",
"LogicException",
"(",
"\"... | Create a new pipeline from its type and params.
@param string $pipelineType Pipeline type (must be a valid pipeline type defined into the factories array).
@param array $pipelineParams Pipeline constructor params.
@return PipelineInterface | [
"Create",
"a",
"new",
"pipeline",
"from",
"its",
"type",
"and",
"params",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/Aggregation/PipelineFactory.php#L50-L57 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php | BaseConfig.addMappings | private function addMappings()
{
$indicesSettings = $this->indexSettings->getIndicesConfig();
foreach ($this->_data as $requestName => $requestConfig) {
$index = $requestConfig['index'];
$this->_data[$requestName]['mapping'] = $indicesSettings[$index]['mapping'];
}
... | php | private function addMappings()
{
$indicesSettings = $this->indexSettings->getIndicesConfig();
foreach ($this->_data as $requestName => $requestConfig) {
$index = $requestConfig['index'];
$this->_data[$requestName]['mapping'] = $indicesSettings[$index]['mapping'];
}
... | [
"private",
"function",
"addMappings",
"(",
")",
"{",
"$",
"indicesSettings",
"=",
"$",
"this",
"->",
"indexSettings",
"->",
"getIndicesConfig",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"_data",
"as",
"$",
"requestName",
"=>",
"$",
"requestConfig",
... | Append the type mapping to search requests configuration.
@return BaseConfig | [
"Append",
"the",
"type",
"mapping",
"to",
"search",
"requests",
"configuration",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php#L78-L88 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php | BaseConfig.addFilters | private function addFilters()
{
foreach ($this->_data as $requestName => $requestConfig) {
if (isset($requestConfig['filters'])) {
$filters = [];
foreach ($requestConfig['filters'] as $filterName => $filterClass) {
$filters[$filterName] = $thi... | php | private function addFilters()
{
foreach ($this->_data as $requestName => $requestConfig) {
if (isset($requestConfig['filters'])) {
$filters = [];
foreach ($requestConfig['filters'] as $filterName => $filterClass) {
$filters[$filterName] = $thi... | [
"private",
"function",
"addFilters",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_data",
"as",
"$",
"requestName",
"=>",
"$",
"requestConfig",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"requestConfig",
"[",
"'filters'",
"]",
")",
")",
"{",
"$",
... | Append the filters to search requests configuration.
@return BaseConfig | [
"Append",
"the",
"filters",
"to",
"search",
"requests",
"configuration",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php#L95-L108 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php | BaseConfig.addAggregationProviders | private function addAggregationProviders()
{
foreach ($this->_data as $requestName => $requestConfig) {
if (isset($requestConfig['aggregationsProviders'])) {
$providers = [];
foreach ($requestConfig['aggregationsProviders'] as $providerName => $providerClass) {
... | php | private function addAggregationProviders()
{
foreach ($this->_data as $requestName => $requestConfig) {
if (isset($requestConfig['aggregationsProviders'])) {
$providers = [];
foreach ($requestConfig['aggregationsProviders'] as $providerName => $providerClass) {
... | [
"private",
"function",
"addAggregationProviders",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_data",
"as",
"$",
"requestName",
"=>",
"$",
"requestConfig",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"requestConfig",
"[",
"'aggregationsProviders'",
"]",
"... | Append the aggregation providers to search requests configuration.
@return BaseConfig | [
"Append",
"the",
"aggregation",
"providers",
"to",
"search",
"requests",
"configuration",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php#L115-L128 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php | BaseConfig.addAggregationFilters | private function addAggregationFilters()
{
foreach ($this->_data as $requestName => $requestConfig) {
if (isset($requestConfig['aggregations'])) {
$aggregations = [];
foreach ($requestConfig['aggregations'] as $aggName => $aggConfig) {
$aggreg... | php | private function addAggregationFilters()
{
foreach ($this->_data as $requestName => $requestConfig) {
if (isset($requestConfig['aggregations'])) {
$aggregations = [];
foreach ($requestConfig['aggregations'] as $aggName => $aggConfig) {
$aggreg... | [
"private",
"function",
"addAggregationFilters",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_data",
"as",
"$",
"requestName",
"=>",
"$",
"requestConfig",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"requestConfig",
"[",
"'aggregations'",
"]",
")",
")",
... | Append the aggregation filters to search requests configuration.
@return BaseConfig | [
"Append",
"the",
"aggregation",
"filters",
"to",
"search",
"requests",
"configuration",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php#L135-L148 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php | BaseConfig.replaceAggregationFilter | private function replaceAggregationFilter($aggregationConfig)
{
if (isset($aggregationConfig['filters'])) {
$filters = [];
foreach ($aggregationConfig['filters'] as $filterName => $filterClass) {
// Done in \Smile\ElasticsuiteCore\Search\Request\ContainerConfiguratio... | php | private function replaceAggregationFilter($aggregationConfig)
{
if (isset($aggregationConfig['filters'])) {
$filters = [];
foreach ($aggregationConfig['filters'] as $filterName => $filterClass) {
// Done in \Smile\ElasticsuiteCore\Search\Request\ContainerConfiguratio... | [
"private",
"function",
"replaceAggregationFilter",
"(",
"$",
"aggregationConfig",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"aggregationConfig",
"[",
"'filters'",
"]",
")",
")",
"{",
"$",
"filters",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"aggregationConfig",... | Instanciates aggregation filter classes.
@param array $aggregationConfig Aggregation config
@return array | [
"Instanciates",
"aggregation",
"filter",
"classes",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/ContainerConfiguration/BaseConfig.php#L157-L180 |
Smile-SA/elasticsuite | src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassDelete.php | MassDelete.execute | public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
$thesauriIds = $this->getRequest()->getParam('thesauri');
if (!is_array($thesauriIds)) {
$this->messageManager->a... | php | public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
$thesauriIds = $this->getRequest()->getParam('thesauri');
if (!is_array($thesauriIds)) {
$this->messageManager->a... | [
"public",
"function",
"execute",
"(",
")",
"{",
"/** @var \\Magento\\Backend\\Model\\View\\Result\\Redirect $resultRedirect */",
"$",
"resultRedirect",
"=",
"$",
"this",
"->",
"resultRedirectFactory",
"->",
"create",
"(",
")",
";",
"$",
"thesauriIds",
"=",
"$",
"this",
... | Delete a Thesaurus
@return \Magento\Backend\Model\View\Result\Redirect | [
"Delete",
"a",
"Thesaurus"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-thesaurus/Controller/Adminhtml/Thesaurus/MassDelete.php#L32-L61 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php | ItemFactory.create | public function create(array $data)
{
$data = $this->addProductData($data);
unset($data['product']);
return parent::create($data);
} | php | public function create(array $data)
{
$data = $this->addProductData($data);
unset($data['product']);
return parent::create($data);
} | [
"public",
"function",
"create",
"(",
"array",
"$",
"data",
")",
"{",
"$",
"data",
"=",
"$",
"this",
"->",
"addProductData",
"(",
"$",
"data",
")",
";",
"unset",
"(",
"$",
"data",
"[",
"'product'",
"]",
")",
";",
"return",
"parent",
"::",
"create",
... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php#L77-L83 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php | ItemFactory.addProductData | private function addProductData($data)
{
$product = $data['product'];
$productData = [
'title' => $product->getName(),
'image' => $this->getImageUrl($product),
'url' => $product->getProductUrl(),
'price' => $this->renderProductPrice($product, \Magen... | php | private function addProductData($data)
{
$product = $data['product'];
$productData = [
'title' => $product->getName(),
'image' => $this->getImageUrl($product),
'url' => $product->getProductUrl(),
'price' => $this->renderProductPrice($product, \Magen... | [
"private",
"function",
"addProductData",
"(",
"$",
"data",
")",
"{",
"$",
"product",
"=",
"$",
"data",
"[",
"'product'",
"]",
";",
"$",
"productData",
"=",
"[",
"'title'",
"=>",
"$",
"product",
"->",
"getName",
"(",
")",
",",
"'image'",
"=>",
"$",
"t... | Load product data and append them to the original data.
@param array $data Autocomplete item data.
@return array | [
"Load",
"product",
"data",
"and",
"append",
"them",
"to",
"the",
"original",
"data",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php#L92-L115 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php | ItemFactory.getImageUrl | private function getImageUrl($product)
{
$this->imageHelper->init($product, self::AUTOCOMPLETE_IMAGE_ID);
return $this->imageHelper->getUrl();
} | php | private function getImageUrl($product)
{
$this->imageHelper->init($product, self::AUTOCOMPLETE_IMAGE_ID);
return $this->imageHelper->getUrl();
} | [
"private",
"function",
"getImageUrl",
"(",
"$",
"product",
")",
"{",
"$",
"this",
"->",
"imageHelper",
"->",
"init",
"(",
"$",
"product",
",",
"self",
"::",
"AUTOCOMPLETE_IMAGE_ID",
")",
";",
"return",
"$",
"this",
"->",
"imageHelper",
"->",
"getUrl",
"(",... | Get resized image URL.
@param ProductInterface $product Current product.
@return string | [
"Get",
"resized",
"image",
"URL",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php#L124-L129 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php | ItemFactory.renderProductPrice | private function renderProductPrice(\Magento\Catalog\Model\Product $product, $priceCode)
{
$priceRender = $this->getPriceRenderer();
$price = $product->getData($priceCode);
if ($priceRender) {
$price = $priceRender->render(
$priceCode,
$product,
... | php | private function renderProductPrice(\Magento\Catalog\Model\Product $product, $priceCode)
{
$priceRender = $this->getPriceRenderer();
$price = $product->getData($priceCode);
if ($priceRender) {
$price = $priceRender->render(
$priceCode,
$product,
... | [
"private",
"function",
"renderProductPrice",
"(",
"\\",
"Magento",
"\\",
"Catalog",
"\\",
"Model",
"\\",
"Product",
"$",
"product",
",",
"$",
"priceCode",
")",
"{",
"$",
"priceRender",
"=",
"$",
"this",
"->",
"getPriceRenderer",
"(",
")",
";",
"$",
"price"... | Renders product price.
@param \Magento\Catalog\Model\Product $product The product
@param string $priceCode The Price Code to render
@return string | [
"Renders",
"product",
"price",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php#L140-L160 |
Smile-SA/elasticsuite | src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php | ItemFactory.getPriceRenderer | private function getPriceRenderer()
{
if (null === $this->priceRenderer) {
/** @var \Magento\Framework\View\LayoutInterface $layout */
$layout = $this->objectManager->get('\Magento\Framework\View\LayoutInterface');
$layout->getUpdate()->addHandle('default');
$... | php | private function getPriceRenderer()
{
if (null === $this->priceRenderer) {
/** @var \Magento\Framework\View\LayoutInterface $layout */
$layout = $this->objectManager->get('\Magento\Framework\View\LayoutInterface');
$layout->getUpdate()->addHandle('default');
$... | [
"private",
"function",
"getPriceRenderer",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"priceRenderer",
")",
"{",
"/** @var \\Magento\\Framework\\View\\LayoutInterface $layout */",
"$",
"layout",
"=",
"$",
"this",
"->",
"objectManager",
"->",
"get",
... | Retrieve Price Renderer Block
@return bool|\Magento\Framework\View\Element\BlockInterface | [
"Retrieve",
"Price",
"Renderer",
"Block"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-catalog/Model/Autocomplete/Product/ItemFactory.php#L167-L187 |
Smile-SA/elasticsuite | src/module-elasticsuite-virtual-category/Model/Webapi/TypeLocator/VirtualCategoryLocator.php | VirtualCategoryLocator.getType | public function getType($attributeCode, $entityType)
{
if ($entityType === Category::ENTITY && $attributeCode === 'virtual_rule') {
return VirtualRuleInterface::class;
}
return parent::getType($attributeCode, $entityType);
} | php | public function getType($attributeCode, $entityType)
{
if ($entityType === Category::ENTITY && $attributeCode === 'virtual_rule') {
return VirtualRuleInterface::class;
}
return parent::getType($attributeCode, $entityType);
} | [
"public",
"function",
"getType",
"(",
"$",
"attributeCode",
",",
"$",
"entityType",
")",
"{",
"if",
"(",
"$",
"entityType",
"===",
"Category",
"::",
"ENTITY",
"&&",
"$",
"attributeCode",
"===",
"'virtual_rule'",
")",
"{",
"return",
"VirtualRuleInterface",
"::"... | {@inheritDoc} | [
"{"
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-virtual-category/Model/Webapi/TypeLocator/VirtualCategoryLocator.php#L35-L42 |
Smile-SA/elasticsuite | src/module-elasticsuite-core/Search/Request/Query/Builder.php | Builder.createQuery | public function createQuery(ContainerConfigurationInterface $containerConfiguration, $query, array $filters, $spellingType)
{
$queryParams = [];
if ($query) {
if (is_object($query)) {
$queryParams['query'] = $query;
}
if (is_string($query) || is_a... | php | public function createQuery(ContainerConfigurationInterface $containerConfiguration, $query, array $filters, $spellingType)
{
$queryParams = [];
if ($query) {
if (is_object($query)) {
$queryParams['query'] = $query;
}
if (is_string($query) || is_a... | [
"public",
"function",
"createQuery",
"(",
"ContainerConfigurationInterface",
"$",
"containerConfiguration",
",",
"$",
"query",
",",
"array",
"$",
"filters",
",",
"$",
"spellingType",
")",
"{",
"$",
"queryParams",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"query",
... | Create a filtered query with an optional fulltext query part.
@param ContainerConfigurationInterface $containerConfiguration Search request container configuration.
@param string|null|QueryInterface $query Search query.
@param array $filters Filter part of... | [
"Create",
"a",
"filtered",
"query",
"with",
"an",
"optional",
"fulltext",
"query",
"part",
"."
] | train | https://github.com/Smile-SA/elasticsuite/blob/0199ac1383c8db3b996ae3a0963e94edadaf0880/src/module-elasticsuite-core/Search/Request/Query/Builder.php#L75-L93 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.