1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 12:10:45 +02:00

Some minor doc tweaks, update $modules->getModuleInfo() method to support returning info for all modules, bump version to 3.0.41

This commit is contained in:
Ryan Cramer
2016-11-18 12:23:27 -05:00
parent a1219e38e9
commit d935e9b699
5 changed files with 40 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
/**
* Class AdminThemeDefault
*
* @property string $colors
* @property string $colors Color set being used: "classic", "warm", "modern" or "futura"
*
*/

View File

@@ -15,6 +15,12 @@
class FieldtypeCache extends Fieldtype {
/**
* Get module information
*
* @return array
*
*/
public static function getModuleInfo() {
return array(
'title' => 'Cache',
@@ -99,6 +105,13 @@ class FieldtypeCache extends Fieldtype {
return parent::___savePageField($page, $field);
}
/**
* Get number of pages in the cache
*
* @param Field $field FieldtypeCache field to check
* @return int Number of cached pages
*
*/
public function getNumPagesCached(Field $field) {
$database = $this->wire('database');
$table = $database->escapeTable($field->getTable());
@@ -113,6 +126,13 @@ class FieldtypeCache extends Fieldtype {
return $num;
}
/**
* Regenerate the cache for the given Field
*
* @param Field $field Field of type FieldtypeCache
* @return int Number of pages that were cached
*
*/
protected function regenerateCache(Field $field) {
$numPages = 0;