nortmas
1/21/2015 - 11:18 AM

Drupal functions

Drupal functions

pathauto_cleanstring($string, array $options = array())                      // генерирует машинное имя
check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE)       // выводит текст с использованием текстовых форматов
module_load_include('inc', 'node', 'node.admin');                            // подключает inc файлы 
drupal_page_is_cacheable(FALSE);                                             // не кешировать текущую страницу
text_summary($text, $format = NULL, $size = NULL);                           // для обрезки текста 
views_trim_text($alter, $value);                                             // для обрезки текста
format_xml_elements($array);                                                 // Formats XML elements (key => value) pair (<key>value</key>)
                                                                             // Associative array with fields: 
                                                                             // - 'key': element name; 
                                                                             // - 'value': element contents; 
                                                                             // - 'attributes': associative array of element attributes
search_excerpt($keys, $text);
check_plain(truncate_utf8($text, 256, TRUE, TRUE));
views_view_has_form_elements($view)                                          //  Returns TRUE if the passed-in view contains handlers with views form
print theme('status_messages');                                              // Show messages
file_uri_scheme($url)                                                        // Detect url scheme     
node_is_page($node)
form_state_values_clean($form_state)                                         // Removes internal Form API elements and buttons from submitted form values.
drupal_substr();
drupal_parse_url();
drupal_html_id();                                                            // Prepares a string for use as a valid HTML ID and guarantees uniqueness.

$status = drupal_get_http_header("status");
if($status == '404 Not Found'){
  /* do something */
}

list($form, $form_state) = ajax_get_form();
drupal_process_form($form['#form_id'], $form, $form_state);