Skip to content

Commit

Permalink
CU-5whv1n move custom classes to local namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
moodledev committed Jul 2, 2020
1 parent 11f9315 commit 351eaeb
Show file tree
Hide file tree
Showing 77 changed files with 258 additions and 204 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The following field definition transforms `1,5,123` into `Group 1, Group 5, Grou
'tables' => ['u'],
'attributes' => [
[
'type' => \block_dash\data_grid\field\attribute\rename_ids_attribute::class,
'type' => \block_dash\local\data_grid\field\attribute\rename_ids_attribute::class,
'options' => [
'table' => 'groups',
'field' => 'name',
Expand All @@ -96,4 +96,6 @@ The following field definition transforms `1,5,123` into `Group 1, Group 5, Grou
* Add support for PostgreSQL
* Improve filtering
* Add renaming field attribute to map objects to IDs returned by query
* Moved custom classes to `local` namespace
* Improved CSS selectors

2 changes: 1 addition & 1 deletion block_dash.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

use block_dash\block_builder;
use block_dash\local\block_builder;

defined('MOODLE_INTERNAL') || die();

Expand Down
3 changes: 2 additions & 1 deletion classes/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

require_once("$CFG->libdir/externallib.php");

use block_dash\data_source\form\preferences_form;
use block_dash\local\block_builder;
use block_dash\local\data_source\form\preferences_form;
use block_dash\output\renderer;
use external_api;

Expand Down
6 changes: 3 additions & 3 deletions classes/block_builder.php → classes/local/block_builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash;
namespace block_dash\local;

use block_dash\configuration\configuration_interface;
use block_dash\configuration\configuration;
use block_dash\local\configuration\configuration_interface;
use block_dash\local\configuration\configuration;
use block_dash\output\renderer;

defined('MOODLE_INTERNAL') || die();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\configuration;
namespace block_dash\local\configuration;

use block_dash\data_source\data_source_interface;
use block_dash\local\data_source\data_source_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\configuration;
namespace block_dash\local\configuration;

use block_dash\data_source\data_source_factory;
use block_dash\local\data_source\data_source_factory;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\configuration;
namespace block_dash\local\configuration;

use block_dash\data_source\data_source_interface;
use block_dash\local\data_source\data_source_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data;
namespace block_dash\local\data_grid\data;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data;
namespace block_dash\local\data_grid\data;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data;
namespace block_dash\local\data_grid\data;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data;
namespace block_dash\local\data_grid\data;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data\strategy;
namespace block_dash\local\data_grid\data\strategy;

use block_dash\data_grid\data\data_collection_interface;
use block_dash\data_grid\data_grid_interface;
use block_dash\local\data_grid\data\data_collection_interface;
use block_dash\local\data_grid\data_grid_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data\strategy;
namespace block_dash\local\data_grid\data\strategy;

use block_dash\data_grid\data\data_collection;
use block_dash\data_grid\data\data_collection_interface;
use block_dash\data_grid\data\field;
use block_dash\data_grid\data_grid_interface;
use block_dash\data_grid\field\field_definition_interface;
use block_dash\local\data_grid\data\data_collection;
use block_dash\local\data_grid\data\data_collection_interface;
use block_dash\local\data_grid\data\field;
use block_dash\local\data_grid\data_grid_interface;
use block_dash\local\data_grid\field\field_definition_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\data\strategy;
namespace block_dash\local\data_grid\data\strategy;

use block_dash\data_grid\data\data_collection;
use block_dash\data_grid\data\data_collection_interface;
use block_dash\data_grid\data\field;
use block_dash\data_grid\data_grid_interface;
use block_dash\data_grid\field\field_definition_interface;
use block_dash\local\data_grid\data\data_collection;
use block_dash\local\data_grid\data\data_collection_interface;
use block_dash\local\data_grid\data\field;
use block_dash\local\data_grid\data_grid_interface;
use block_dash\local\data_grid\field\field_definition_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid;

use block_dash\data_grid\data\data_collection_interface;
use block_dash\data_grid\data\strategy\data_strategy_interface;
use block_dash\data_grid\data\strategy\standard_strategy;
use block_dash\data_grid\field\field_definition_interface;
use block_dash\data_grid\filter\filter_collection_interface;
use block_dash\data_source\data_source_interface;
namespace block_dash\local\data_grid;

use block_dash\local\data_grid\data\data_collection_interface;
use block_dash\local\data_grid\data\strategy\data_strategy_interface;
use block_dash\local\data_grid\data\strategy\standard_strategy;
use block_dash\local\data_grid\field\field_definition_interface;
use block_dash\local\data_grid\filter\filter_collection_interface;
use block_dash\local\data_source\data_source_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid;
namespace block_dash\local\data_grid;

use block_dash\data_grid\data\data_collection_interface;
use block_dash\data_grid\data\strategy\data_strategy_interface;
use block_dash\data_grid\field\field_definition_interface;
use block_dash\data_source\data_source_interface;
use block_dash\local\data_grid\data\data_collection_interface;
use block_dash\local\data_grid\data\strategy\data_strategy_interface;
use block_dash\local\data_grid\field\field_definition_interface;
use block_dash\local\data_source\data_source_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field;
namespace block_dash\local\data_grid\field;

use block_dash\data_grid\field\attribute\field_attribute_interface;
use block_dash\data_grid\data_grid_interface;
use block_dash\local\data_grid\field\attribute\field_attribute_interface;
use block_dash\local\data_grid\data_grid_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

use block_dash\data_grid\field\field_definition_interface;
use block_dash\local\data_grid\field\field_definition_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

use block_dash\data_grid\field\field_definition_interface;
use block_dash\local\data_grid\field\field_definition_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

use block_dash\data_grid\filter\group_filter;
use block_dash\local\data_grid\filter\group_filter;
use coding_exception;

defined('MOODLE_INTERNAL') || die();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

use dml_exception;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field\attribute;
namespace block_dash\local\data_grid\field\attribute;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field;
namespace block_dash\local\data_grid\field;

use block_dash\data_grid\field\attribute\field_attribute_interface;
use block_dash\local\data_grid\field\attribute\field_attribute_interface;

defined('MOODLE_INTERNAL') || die();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace block_dash\data_grid\field;
namespace block_dash\local\data_grid\field;

defined('MOODLE_INTERNAL') || die();

Expand Down
Loading

0 comments on commit 351eaeb

Please sign in to comment.