Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
uuid_features
Commits
6b90195b
Commit
6b90195b
authored
Aug 04, 2015
by
git
Committed by
Peter Philipp
Aug 04, 2015
Browse files
Issue
#2511848
by Oleksiy: Allow to alter query of features export options
parent
c46cb004
Changes
13
Hide whitespace changes
Inline
Side-by-side
includes/uuid_bean.features.inc
View file @
6b90195b
...
...
@@ -23,7 +23,8 @@ function uuid_bean_features_export_options() {
$query
->
fields
(
'n'
,
array
(
'bid'
,
'delta'
,
'type'
,
'uuid'
))
->
condition
(
'type'
,
$types
)
->
orderBy
(
'type'
)
->
orderBy
(
'delta'
,
'ASC'
);
->
orderBy
(
'delta'
,
'ASC'
)
->
addTag
(
'uuid_bean_features_export_options'
);
$beans
=
$query
->
execute
()
->
fetchAll
();
foreach
(
$beans
as
$bean
)
{
$options
[
$bean
->
uuid
]
=
t
(
'@type: @delta'
,
array
(
...
...
includes/uuid_book.features.inc
View file @
6b90195b
...
...
@@ -28,7 +28,8 @@ function uuid_book_features_export_options() {
$query
->
entityCondition
(
'entity_type'
,
'node'
)
->
propertyCondition
(
'nid'
,
$book_nids
,
'IN'
)
->
propertyOrderBy
(
'title'
);
->
propertyOrderBy
(
'title'
)
->
addTag
(
'uuid_book_features_export_options'
);
$result
=
$query
->
execute
();
if
(
!
empty
(
$result
[
'node'
]))
{
$nodes
=
node_load_multiple
(
array_keys
(
$result
[
'node'
]));
...
...
includes/uuid_commerce_product.features.inc
View file @
6b90195b
...
...
@@ -18,7 +18,8 @@ function uuid_commerce_product_features_export_options() {
$query
->
fields
(
'cp'
,
array
(
'product_id'
,
'title'
,
'type'
,
'uuid'
))
->
condition
(
'type'
,
$enabled_types
)
->
orderBy
(
'type'
)
->
orderBy
(
'title'
);
->
orderBy
(
'title'
)
->
addTag
(
'uuid_commerce_product_features_export_options'
);
$products
=
$query
->
execute
()
->
fetchAll
();
foreach
(
$products
as
$product
)
{
$options
[
$product
->
uuid
]
=
t
(
'@type: @title'
,
array
(
...
...
includes/uuid_current_search_configuration.features.inc
View file @
6b90195b
...
...
@@ -12,6 +12,7 @@ function uuid_current_search_configuration_features_export_options() {
$current_search_items
=
db_select
(
'block_current_search'
,
'b'
)
->
fields
(
'b'
,
array
(
'delta'
,
'searcher'
))
->
addTag
(
'uuid_current_search_configuration_features_export_options'
)
->
execute
()
->
fetchAllAssoc
(
'delta'
);
...
...
includes/uuid_field_collection.features.inc
View file @
6b90195b
...
...
@@ -23,6 +23,7 @@ function uuid_field_collection_features_export_options() {
$efq_field_collection_items
=
new
EntityFieldQuery
();
$efq_field_collection_items
->
entityCondition
(
'entity_type'
,
'field_collection_item'
);
$efq_field_collection_items
->
entityCondition
(
'bundle'
,
$enabled_bundles
);
$efq_field_collection_items
->
addTag
(
'uuid_field_collection_features_export_options'
);
$result
=
$efq_field_collection_items
->
execute
();
if
(
!
empty
(
$result
[
'field_collection_item'
]))
{
...
...
includes/uuid_file_entity.features.inc
View file @
6b90195b
...
...
@@ -18,7 +18,8 @@ function uuid_file_entity_features_export_options() {
->
entityCondition
(
'entity_type'
,
'file'
)
->
propertyCondition
(
'type'
,
$enabled_types
,
'IN'
)
->
propertyOrderBy
(
'filename'
)
->
propertyOrderBy
(
'type'
);
->
propertyOrderBy
(
'type'
)
->
addTag
(
'uuid_file_entity_features_export_options'
);
$result
=
$query
->
execute
();
if
(
!
empty
(
$result
[
'file'
]))
{
...
...
includes/uuid_fpp.features.inc
View file @
6b90195b
...
...
@@ -10,9 +10,13 @@
function
uuid_fpp_features_export_options
()
{
$options
=
array
();
$query
=
'SELECT f.fpid, f.admin_title, f.title, f.bundle, f.uuid
FROM {fieldable_panels_panes} f ORDER BY f.bundle, f.title ASC'
;
$results
=
db_query
(
$query
);
$query
=
db_select
(
'fieldable_panels_panes'
,
'f'
)
->
fields
(
'f'
,
array
(
'fpid'
,
'admin_title'
,
'title'
,
'bundle'
,
'uuid'
))
->
orderBy
(
'f.bundle'
,
'ASC'
)
->
orderBy
(
'f.title'
,
'ASC'
)
->
addTag
(
'uuid_fpp_features_export_options'
);
$results
=
$query
->
execute
()
->
fetchAll
();
foreach
(
$results
as
$fpp
)
{
$bundle_name
=
ucwords
(
str_replace
(
'_'
,
' '
,
$fpp
->
bundle
));
$display_title
=
(
$fpp
->
admin_title
)
?
$fpp
->
admin_title
:
$fpp
->
uuid
;
...
...
includes/uuid_node.features.inc
View file @
6b90195b
...
...
@@ -24,7 +24,8 @@ function uuid_node_features_export_options() {
$query
->
fields
(
'n'
,
array
(
'nid'
,
'title'
,
'type'
,
'uuid'
))
->
condition
(
'type'
,
$enabled_types
)
->
orderBy
(
'type'
)
->
orderBy
(
'title'
);
->
orderBy
(
'title'
)
->
addTag
(
'uuid_node_features_export_options'
);
$nodes
=
$query
->
execute
()
->
fetchAll
();
foreach
(
$nodes
as
$node
)
{
$options
[
$node
->
uuid
]
=
t
(
'@type: @title'
,
array
(
...
...
includes/uuid_nodequeue_item.features.inc
View file @
6b90195b
...
...
@@ -12,6 +12,7 @@ function uuid_nodequeue_item_features_export_options() {
$result
=
db_select
(
'nodequeue_nodes'
,
'qn'
)
->
fields
(
'qn'
,
array
(
'qid'
,
'sqid'
,
'nid'
,
'position'
))
->
orderBy
(
'position'
,
'ASC'
)
->
addTag
(
'uuid_nodequeue_item_features_export_options'
)
->
execute
();
while
(
$row
=
$result
->
fetchAssoc
())
{
$queue
=
nodequeue_load
(
$row
[
'qid'
]);
...
...
includes/uuid_panelizer.features.inc
View file @
6b90195b
...
...
@@ -16,6 +16,7 @@ function uuid_panelizer_features_export_options() {
->
isNull
(
'name'
)
->
groupBy
(
'entity_type'
)
->
groupBy
(
'entity_id'
)
->
addTag
(
'uuid_panelizer_features_export_options'
)
->
execute
();
foreach
(
$results
as
$panelizer_entity
)
{
...
...
includes/uuid_paragraphs.features.inc
View file @
6b90195b
...
...
@@ -17,6 +17,7 @@ function uuid_paragraphs_features_export_options() {
$efq_paragraphs_items
=
new
EntityFieldQuery
();
$efq_paragraphs_items
->
entityCondition
(
'entity_type'
,
'paragraphs_item'
);
$efq_paragraphs_items
->
entityCondition
(
'bundle'
,
$enabled_bundles
);
$efq_paragraphs_items
->
addTag
(
'uuid_paragraphs_features_export_options'
);
$result
=
$efq_paragraphs_items
->
execute
();
if
(
!
empty
(
$result
[
'paragraphs_item'
]))
{
...
...
includes/uuid_term.features.inc
View file @
6b90195b
...
...
@@ -26,6 +26,7 @@ function uuid_term_features_export_options() {
->
addField
(
'v'
,
'name'
,
'vname'
);
$query
->
orderBy
(
'v.name'
,
'ASC'
);
$query
->
orderBy
(
't.name'
,
'ASC'
);
$query
->
addTag
(
'uuid_term_features_export_options'
);
$results
=
$query
->
execute
()
->
fetchAll
();
foreach
(
$results
as
$term
)
{
...
...
includes/uuid_user.features.inc
View file @
6b90195b
...
...
@@ -10,9 +10,13 @@
function
uuid_user_features_export_options
()
{
$options
=
array
();
$query
=
'SELECT u.uid, u.name, u.mail, u.uuid
FROM {users} u WHERE uid > 0 ORDER BY u.name ASC'
;
$results
=
db_query
(
$query
);
$query
=
db_select
(
'users'
,
'u'
)
->
fields
(
'u'
,
array
(
'uid'
,
'name'
,
'mail'
,
'uuid'
))
->
condition
(
'u.uid'
,
0
,
'>'
)
->
orderBy
(
'u.name'
,
'ASC'
)
->
addTag
(
'uuid_user_features_export_options'
);
$results
=
$query
->
execute
()
->
fetchAll
();
foreach
(
$results
as
$user
)
{
$options
[
$user
->
uuid
]
=
t
(
'@name: @mail'
,
array
(
'@name'
=>
$user
->
name
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment