mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 04:04:13 +02:00
A few minor phpdoc/code comments
This commit is contained in:
@@ -138,11 +138,10 @@ class WireHooks {
|
||||
*
|
||||
* @param Wire $object
|
||||
* @param string $method Optional method that hooks will be limited to. Or specify '*' to return all hooks everywhere.
|
||||
* @param int $type Type of hooks to return: 0=all, 1=local only, 2=static only
|
||||
* @param int $type Type of hooks to return, specify one of the following constants:
|
||||
* - WireHooks::getHooksAll returns all hooks (default)
|
||||
* - WireHooks::getHooksLocal returns local hooks only
|
||||
* - WireHooks::getHooksStatic returns static hooks only
|
||||
* - WireHooks::getHooksAll returns all hooks [0] (default)
|
||||
* - WireHooks::getHooksLocal returns local hooks [1] only
|
||||
* - WireHooks::getHooksStatic returns static hooks [2] only
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
|
@@ -20,6 +20,7 @@
|
||||
* @property bool|int $noCollapseItem Set to true to disable collapsed items (like for LanguageTranslator tool or other things that add tools to files)
|
||||
* @property bool|int $noShortName Set to true to disable shortened filenames in output
|
||||
* @property bool|int $noCustomButton Set to true to disable use of the styled <input type='file'>
|
||||
* @property Pagefiles|Pagefile|null $value
|
||||
*
|
||||
* @method string renderItem($pagefile, $id, $n)
|
||||
* @method string renderList($value)
|
||||
@@ -490,6 +491,13 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap output of files list item
|
||||
*
|
||||
* @param string $out
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
protected function renderItemWrap($out) {
|
||||
// note: using currentItem rather than a new argument since there are now a few modules extending
|
||||
// this one and if they implement their own calls to this method or version of this method then
|
||||
@@ -499,6 +507,14 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
return "<li$id class='{$this->itemClass}'>$out</li>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Render files list ready
|
||||
*
|
||||
* @param Pagefiles|null $value
|
||||
* @throws WireException
|
||||
* @throws WirePermissionException
|
||||
*
|
||||
*/
|
||||
protected function renderListReady($value) {
|
||||
if(!$this->renderValueMode) {
|
||||
// if just rendering the files list (as opposed to saving it), delete any temp files that may have accumulated
|
||||
@@ -511,6 +527,13 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render files list
|
||||
*
|
||||
* @param Pagefiles|null $value
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
protected function ___renderList($value) {
|
||||
|
||||
if(!$value) return '';
|
||||
@@ -534,6 +557,13 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render upload area
|
||||
*
|
||||
* @param Pagefiles|null $value
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
protected function ___renderUpload($value) {
|
||||
if($value) {}
|
||||
if($this->noUpload || $this->renderValueMode) return '';
|
||||
|
@@ -277,6 +277,9 @@ class LanguageSupportPageNames extends WireData implements Module, ConfigurableM
|
||||
} else {
|
||||
// inactive status only applies to the page itself
|
||||
$active = $page->get("status$setLanguage") > 0;
|
||||
|
||||
// https://github.com/processwire/processwire-issues/issues/463
|
||||
// $active = $page->get("status$setLanguage") > 0 || $page->template->noLang;
|
||||
}
|
||||
// if page is inactive for a language, and it's not editable, send a 404
|
||||
if(!$active && !$page->editable() && $page->id != $config->http404PageID) {
|
||||
|
Reference in New Issue
Block a user