Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
V
views_natural_sort
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
views_natural_sort
Commits
e38e8218
Commit
e38e8218
authored
Feb 09, 2016
by
generalredneck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a function to get all the properties that are actually being used.
parent
cef7ae8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
views_natural_sort.module
views_natural_sort.module
+31
-0
No files found.
views_natural_sort.module
View file @
e38e8218
...
...
@@ -353,6 +353,37 @@ function views_natural_sort_get_supported_entity_properties() {
return
$supported_properties
;
}
/**
* Returns a list of properties that we know views will allow us to alter.
*
* This isn't used yet.
*
* @return mixed
* Returns an array formatted as views_natural_sort_get_supported_entity_properties
* or FALSE when views hasn't initianalized yet.
*
* @see views_natural_sort_get_views_configurable_properties
*/
function
views_natural_sort_get_views_configurable_properties
()
{
$views_configurable_properties
=
&
drupal_static
(
__FUNCTION__
,
array
());
if
(
empty
(
$supported_properties
))
{
$supported_entity_properties
=
views_natural_sort_get_supported_entity_properties
();
$views_data
=
views_fetch_data
();
if
(
empty
(
$views_data
))
{
return
FALSE
;
}
foreach
(
$supported_entity_properties
as
$entity
=>
$properties
)
{
foreach
(
$properties
as
$property
=>
$schema_info
)
{
if
(
empty
(
$views_data
[
$schema_info
[
'base_table'
]][
$schema_info
[
'schema_field'
]])
||
empty
(
$views_data
[
$schema_info
[
'base_table'
]][
$schema_info
[
'schema_field'
]][
'sort'
])
||
empty
(
$views_data
[
$schema_info
[
'base_table'
]][
$schema_info
[
'schema_field'
]][
'sort'
][
'handler'
])
||
!
in_array
(
$views_data
[
$schema_info
[
'base_table'
]][
$schema_info
[
'schema_field'
]][
'sort'
][
'handler'
],
array
(
'views_natural_sort_handler_sort'
,
'views_handler_sort'
)))
{
}
}
}
return
$views_configurable_properties
;
}
/**
* A helper function for creating a VNS record for storage.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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