You are here

function view_mode_page_pattern_hash in View Mode Page 8.2

Same name and namespace in other branches
  1. 7.2 view_mode_page.module \view_mode_page_pattern_hash()

Calculate the hash of this pattern

Parameters

object $pattern: Object of the pattern information

Return value

string The pattern hash

3 calls to view_mode_page_pattern_hash()
view_mode_page_list_patterns in ./view_mode_page.module
Return a list of patterns
view_mode_page_remove_pattern in ./view_mode_page.module
Form for removing the pattern
view_mode_page_remove_pattern_submit in ./view_mode_page.module
Submit handler for the remove pattern form

File

./view_mode_page.module, line 826
View Mode Page module allows users to add a page for a specific view mode.

Code

function view_mode_page_pattern_hash($pattern) {
  return sha1($pattern->entity_type . $pattern->content_type . $pattern->view_mode . $pattern->url_pattern);
}