Update to make all class E_NOTICE safe, add page_content

- ALL classes are E_NOTICE safe as far as possible.
There might be some minor things left over which will be cleaned up in
further testing

- Added declare(strict_types=1); on all pages for trying to make all
calls strict

- Added page_content sub content to edit_page, with this some inner page
content with ACL can be set, eg for use with Ajax/JS calls with backend.
Also alias can be set so the control ajax pages can back reference to
the master page content setting. Currently only one back reference is
allowed

- Note that the PAGES array has no numeric indexes, but uses the cuid as
index
This commit is contained in:
Clemens Schwaighofer
2019-09-10 10:52:52 +09:00
parent c8686024e2
commit 46554e6965
47 changed files with 1464 additions and 1037 deletions

View File

@@ -274,6 +274,22 @@ const keyInObject = (key, object) => (key in object) ? true : false;
return (key in object) ? true : false;
}*/
// METHOD: getKeyByValue
// PARAMS: object, value
// RETURN: key found
// DESC : returns matching key of value
const getKeyByValue = (obj, value) => Object.keys(obj).find(key => obj[key] === value);
// function getKeyByValue(object, value)
// {
// return Object.keys(object).find(key => object[key] === value);
// }
// METHOD: valueInObject
// PARAMS: obj, value
// RETURN: true/false
// DESC : returns true if value is found in object with a key
const valueInObject = (obj, value) => (Object.keys(obj).find(key => obj[key] === value)) ? true : false;
// METHOD: exists
// PARAMS: uid
// RETURN: true/false

View File

@@ -352,6 +352,22 @@ const keyInObject = (key, object) => (key in object) ? true : false;
return (key in object) ? true : false;
}*/
// METHOD: getKeyByValue
// PARAMS: object, value
// RETURN: key found
// DESC : returns matching key of value
const getKeyByValue = (obj, value) => Object.keys(obj).find(key => obj[key] === value);
// function getKeyByValue(object, value)
// {
// return Object.keys(object).find(key => object[key] === value);
// }
// METHOD: valueInObject
// PARAMS: obj, value
// RETURN: true/false
// DESC : returns true if value is found in object with a key
const valueInObject = (obj, value) => (Object.keys(obj).find(key => obj[key] === value)) ? true : false;
// METHOD: exists
// PARAMS: uid
// RETURN: true/false