[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/ctools/includes/ -> css.inc (summary)

(no description)

File Size: 588 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 15 functions

  ctools_css_store()
  ctools_css_retrieve()
  ctools_css_clear()
  ctools_css_cache()
  ctools_css_add_css()
  ctools_css_filter()
  ctools_css_assemble()
  ctools_css_compress()
  ctools_css_disassemble()
  _ctools_css_disassemble_selector()
  _ctools_css_disassemble_declaration()
  ctools_css_filter_css_data()
  ctools_css_filter_default_allowed_properties()
  ctools_css_filter_default_allowed_values()
  ctools_css_flush_caches()

Functions
Functions that are not part of a class:

ctools_css_store($id, $css, $filter = TRUE)   X-Ref
Store CSS with a given id and return the filename to use.

This function associates a piece of CSS with an id, and stores the
cached filename and the actual CSS for later use with
ctools_css_retrieve.

ctools_css_retrieve($id)   X-Ref
Retrieve a filename associated with an id of previously cached CSS.

This will ensure the file still exists and, if not, create it.

ctools_css_clear($id)   X-Ref
Remove stored CSS and any associated file.


ctools_css_cache($css, $filter = TRUE)   X-Ref
Write a chunk of CSS to a temporary cache file and return the file name.

This function optionally filters the CSS (always compressed, if so) and
generates a unique filename based upon md5. It returns that filename that
can be used with ctools_css_add_css(). Note that as a cache file, technically
this file is volatile so it should be checked before it is used to ensure
that it exists.

You can use file_exists() to test for the file and file_delete() to remove
it if it needs to be cleared.

param: $css
param: $filter
return: $filename

ctools_css_add_css($filename = NULL, $type = 'module', $media = 'all', $preprocess = TRUE)   X-Ref
Add a CTools CSS file to the page.

Because drupal_add_css() does not handle files that it cannot stat, it
can't add files that are stored in a private file system. This will
will check to see if we're using the private file system and use
drupal_set_html_head() instead if that is the case.

Sadly that will preclude aggregation of any sort, but there doesn't seem to
be any ways around that. Also it will screw with stylesheet order. Again,
sorry.

ctools_css_filter($css, $compressed = TRUE)   X-Ref
Filter a chunk of CSS text.

This function disassembles the CSS into a raw format that makes it easier
for our tool to work, then runs it through the filter and reassembles it.
If you find that you want the raw data for some reason or another, you
can use the disassemble/assemble functions yourself.

param: $css
param: $compressed

ctools_css_assemble($css_data)   X-Ref
Re-assemble a css string and format it nicely.

param: array $css_data
return: string $css

ctools_css_compress($css_data)   X-Ref
Compress css data (filter it first!) to optimize for use on view.

param: array $css_data
return: string $css

ctools_css_disassemble($css)   X-Ref
Disassemble the css string.

Strip the css of irrelevant characters, invalid/malformed selectors and
declarations, and otherwise prepare it for processing.

param: string $css
return: array $disassembled_css

_ctools_css_disassemble_selector($selector_str)   X-Ref
No description

_ctools_css_disassemble_declaration($declaration)   X-Ref
No description

ctools_css_filter_css_data($css, $allowed_properties = array()   X-Ref
Run disassembled $css through the filter.

param: $css
param: $allowed_properties
param: $allowed_values
return:

ctools_css_filter_default_allowed_properties()   X-Ref
Provide a deafult list of allowed properties by the filter.


ctools_css_filter_default_allowed_values()   X-Ref
Provide a default list of allowed values by the filter.


ctools_css_flush_caches()   X-Ref
Delegated implementation of hook_flush_caches()




Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7