Home
last modified time | relevance | path

Searched +full:page +full:schema +(+path:plugin +path:struct) -(+path:plugin +path:struct +path:lang) (Results 1 – 25 of 35) sorted by relevance

12

/plugin/struct/
H A Dhelper.php14 use dokuwiki\plugin\struct\meta\Schema;
40 * Get the structured data of a given page
42 * @param string $page The page to get data for
43 * @param string|null $schema The schema to use null for all
45 * @return array ('schema' => ( 'fieldlabel' => 'value', ...))
48 public function getData($page, $schema = null, $time = 0)
50 $page
13 use dokuwiki\plugin\struct\meta\Schema; global() alias
47 getData($page, $schema = null, $time = 0) global() argument
93 saveData($page, $data, $summary = '', $minor = false) global() argument
147 createPageRevision($page, $summary = '', $minor = false) global() argument
166 getSchema($schema = null) global() argument
190 getPages($schema = null) global() argument
[all...]
H A Dremote.php35 * Get the structured data of a given page
37 * @param string $page The page to get data for
38 * @param string $schema The schema to use empty for all
40 * @return array ('schema' => ( 'fieldlabel' => 'value', ...))
44 public function getData($page, $schema, $time)
46 $page = cleanID($page);
41 getData($page, $schema, $time) global() argument
74 saveData($page, $data, $summary, $minor = false) global() argument
100 getSchema($schema = null) global() argument
[all...]
H A Ddeleted.files24 _test/Schema.test.php
58 _test/json/schema1.schema.json
59 _test/json/schema2.schema.json
82 meta/Page.php
/plugin/struct/action/
H A Dmove.php16 use dokuwiki\plugin\struct\meta\Schema;
19 use dokuwiki\plugin\struct\types\Page;
39 * Renames all occurrences of a page ID in the database
42 * @param bool $ispage is this a page move operation?
65 $schemas = Schema::getAll();
67 $schema = new Schema($table);
68 foreach ($schema->getColumns() as $col) {
70 if (get_class($col->getType()) == Page::class) {
71 $this->updateColumnID($schema,
12 use dokuwiki\plugin\struct\meta\Schema; global() alias
15 use dokuwiki\plugin\struct\types\Page; global() alias
152 updateColumnID(Schema $schema, Column $col, $old, $new, $hashes = false) global() argument
193 updateColumnLookup(Schema $schema, Column $col, $old, $new) global() argument
[all...]
H A Doutput.php13 use dokuwiki\plugin\struct\meta\Schema;
18 * This action component handles the automatic output of all schema data that has been assigned
19 * to the current page by appending the appropriate instruction to the handler calls.
42 * Appends the instruction to render our syntax output component to each page
94 * If the page has a schema assigned, add its struct data
113 foreach ($data as $schema => $fields) {
114 $schemaObject = new Schema($schema);
123 $placeholder = sprintf('@%s_%s_%s@', self::DW2PDF_PLACEHOLDER_PREFIX, $schema,
10 use dokuwiki\plugin\struct\meta\Schema; global() alias
[all...]
H A Dentry.php20 * Handles the entry process of struct data with type "page"
25 * @var string The form name we use to transfer schema data
48 // ensure a page revision is created when struct data changes:
50 // save struct data after page has been saved:
69 // run the validation for each assignded schema
93 * Check if the page has to be changed
102 if ($event->data['contentChanged']) return false; // will be saved for page changes
108 // this happens when a new page is tried to be created with only struct data
154 // make sure this schema is assigned
H A Dbureaucracy.php15 use dokuwiki\plugin\struct\meta\Schema;
23 * submitted through the bureaucracy form to all newly created pages (if the schema applies).
26 * schema to the form. The struct_field type is added through standard naming convention - see
46 * Load a whole schema as fields
64 $schema = new Schema($helper->opt['label']);
65 if (!$schema->getId()) {
66 msg('This schema does not exist', -1);
70 foreach ($schema->getColumns(false) as $column) {
104 $search->addSchema($config['schema']);
12 use dokuwiki\plugin\struct\meta\Schema; global() alias
[all...]
H A Dcache.php39 * For pages potentially containing schema data, refresh the cache when schema data has been
52 if (!$cache->page) return true; // not a page cache
55 if (!$assignments->getPageAssignments($cache->page)) return true; // no struct here
77 if (!$cache->page) return true; // not a page cache
79 $meta = p_get_metadata($cache->page, 'plugin struct');
89 // dynamic renders should never overwrite the default page cache
132 if (!$cache->page) retur
[all...]
H A Dinline.php88 // only check page permissions for data with pid, skip for global data
92 // lock page
133 throw new StructException('inline save error: schema not assigned to page');
137 throw new StructException('inline save error: no permission for schema');
156 p_get_metadata($this->pid); // reparse the metadata of the page top update the titles/rev/lasteditor table
164 // make sure this schema is assigned
190 * Unlock a page (on cancel action)
245 * Checks if a page can be edited
252 throw new StructException('inline save error: no such page');
[all...]
H A Dmigration.php74 * Unifies previous page and lookup schema types
120 foreach ($schemas as $schema) {
121 $name = $schema['tbl'];
122 $sid = $schema['id'];
123 $isLookup = $schema['islookup'];
232 * was always ["", <previous-pid-aka-new-rid>]. For page references it is ["<previous-pid>", 0]
246 foreach ($schemas as $schema) {
248 $name = $schema['tbl'];
249 $sid = $schema['i
[all...]
/plugin/struct/meta/
H A DAccessTable.php17 /** @var Schema */
18 protected $schema; variable in dokuwiki\\plugin\\struct\\meta\\AccessTable
59 $schema = new Schema($tablename, $ts);
60 return new AccessTablePage($schema, $pid, $ts, 0);
65 $schema = new Schema($tablename, 0);
66 return new AccessTableSerial($schema, $pid, 0, $rid);
71 $schema = new Schema(
85 bySchema(Schema $schema, $pid, $ts = 0, $rid = 0) global() argument
124 __construct($schema, $pid, $ts = 0, $rid = 0) global() argument
[all...]
H A DCSVSerialImporter.php11 * Import page schema only when the pid header is present.
17 throw new StructException('There is no "pid" header in the CSV. Schema not imported.');
27 // create new page
37 * Create a page with serial syntax, either from a namespace template with _serial suffix
53 $schema = $this->schema->getTable();
56 schema: $schema
64 * Check if page i
[all...]
H A DAccessTablePage.php9 * This class is for accessing the data stored for a page in a schema
16 public function __construct($schema, $pid, $ts = 0, $rid = 0) argument
19 parent::__construct($schema, $pid, $ts, $rid);
23 * adds an empty data set for this schema and page
25 * This is basically a delete for the schema fields of a page
33 foreach ($this->schema->getColumns() as $col) {
49 $table = 'data_' . $this->schema
[all...]
H A DCSVImporter.php5 use dokuwiki\plugin\struct\types\Page; alias
16 /** @var Schema */
17 protected $schema; variable in dokuwiki\\plugin\\struct\\meta\\CSVImporter
38 * @var string data type, must be one of page, global, serial
54 $this->schema = new Schema($table);
55 if (!$this->schema->getId()) throw new StructException('Schema does not exist');
104 * Read the CSV headers and match it with the Schema columns
112 // we might have to create a page colum
[all...]
H A DInlineConfigParser.php10 * {{$schema.field}}
11 * {{$pageid.schema.field}}
16 * If no page ID or filter is supplied, filter: "%pageid% = $ID$" is added.
43 $filtering = false; // Whether to filter result to current page
81 // Check whether a page was specified
83 // At least page, schema and field supplied
84 $lines[] = 'schema: ' . trim($components[1]);
88 // At least schema and field supplied
89 $lines[] = 'schema
[all...]
H A DCSVPageImporter.php13 * Import page schema only when the pid header is present.
19 throw new StructException('There is no "pid" header in the CSV. Schema not imported.');
29 //create new page revision
34 // make sure this schema is assigned
38 $this->schema->getTable()
44 * Create a page from a namespace template and replace column-label-placeholders
121 * Check if page id realy exists
129 //check if page id exists and schema i
[all...]
H A DAssignments.php9 * An assignment is created when actual struct data is attached to the page.
119 * Rechecks all assignments of a given page against the current patterns
170 * Add page to assignments
172 * @param string $page
176 public function assignPageSchema($page, $table)
179 return (bool)$this->sqlite->query($sql, [$page, $table]);
183 * Remove page from assignments
185 * @param string $page
189 public function deassignPageSchema($page, $table)
192 return (bool)$this->sqlite->query($sql, [$page,
174 assignPageSchema($page, $table) global() argument
187 deassignPageSchema($page, $table) global() argument
210 getPageAssignments($page, $checkpatterns = true) global() argument
242 getPages($schema = null, $assignedonly = false) global() argument
278 matchPagePattern($pattern, $page, $pns = null) global() argument
321 getHistoricAssignments($page, $ts) global() argument
[all...]
H A DSchemaEditor.php12 * Provides the editing interface for a given Schema as used in the admin backend. The actual modifying of the
13 * schema happens in the SchemaBuilder class.
19 /** @var Schema the schema that is edited */ variable in dokuwiki\\plugin\\struct\\meta\\SchemaEditor
20 protected $schema;
27 * @param Schema $schema
29 public function __construct(Schema $schema)
31 $this->schema
28 __construct(Schema $schema) global() argument
[all...]
H A DSearch.php10 use dokuwiki\plugin\struct\types\Page;
32 /** @var Schema[] list of schemas to query */
80 * Add a schema to be searched
89 $schema = new Schema($table);
90 if (!$schema->getId()) {
91 throw new StructException('schema missing', $table);
94 $this->schemas[$schema->getTable()] = $schema;
95 if ($alias) $this->aliases[$alias] = $schema
8 use dokuwiki\plugin\struct\types\Page; global() alias
[all...]
/plugin/struct/admin/
H A Dschemas.php17 use dokuwiki\plugin\struct\meta\Schema;
51 $table = Schema::cleanTableName($INPUT->str('table'));
53 $builder = new SchemaBuilder($table, $INPUT->arr('schema'));
61 $builder = new Schema($table);
117 $schema = new Schema($table);
118 $schema->delete();
121 send_redirect(wl($ID, ['do' => 'admin', 'page' => 'struct_schemas'], true, '&'));
134 $schema = new Schema(
15 use dokuwiki\plugin\struct\meta\Schema; global() alias
190 htmlJson(Schema $schema) global() argument
259 htmlDelete(Schema $schema) global() argument
[all...]
H A Dassignments.php81 send_redirect(wl($ID, ['do' => 'admin', 'page' => 'struct_assignments'], true, '&'));
104 echo '<input type="hidden" name="page" value="struct_assignments" />';
117 $schema = $assignment['tbl'];
124 'page' => 'struct_assignments',
127 'assignment[tbl]' => $schema,
134 echo '<td>' . hsc($schema) . '</td>';
145 foreach ($schemas as $schema) {
146 if ($schema->isInternal()) continue;
147 $table = $schema->getTable();
160 * Copies the TOC from the Schema Edito
12 use dokuwiki\plugin\struct\meta\Schema; global() alias
[all...]
/plugin/struct/script/
H A DSchemaEditor.js3 * Handle tabs in the Schema Editor
20 * Toggle the disabled class in the schema editor
28 * Confirm Schema Deletion
31 var schema = jQuery(this).closest('tr').find('td:nth-child(2)').text();
32 var page = jQuery(this).closest('tr').find('td:nth-child(1)').text();
33 if (!window.confirm(formatString(LANG.plugins.struct['confirmAssignmentsDelete'], schema, page))) {
H A DAggregationEditor.js9 const schema = $table.parents('.structaggregation').data('schema');
10 if (!schema) return;
40 if (rid === '') return; // skip button addition for page data
57 schema: schema,
98 // if page id needs to be passed to backend, add pid
104 }).appendTo($form); // add the page id to the form
/plugin/struct/helper/
H A Dfield.php4 use dokuwiki\plugin\struct\meta\Schema; alias
9 use dokuwiki\plugin\struct\types\Page; alias
155 * Special handling for Page and Lookup literal form values.
164 // page fields might need to be JSON encoded depending on usetitles config
166 $this->column->getType() instanceof Page
219 * Tries to find the correct column and schema
229 throw new StructException('Field \'%s\' not given in schema.field form', $colname);
231 $schema = new Schema($table);
232 return $schema
[all...]
/plugin/struct/types/
H A DLookup.php11 use dokuwiki\plugin\struct\meta\Schema; alias
19 protected $config = ['schema' => '', 'field' => ''];
35 $this->config['schema'] = Schema::cleanTableName($this->config['schema']);
46 $this->column = $this->getColumn($this->config['schema'], $this->config['field']);
61 $table = new Schema($table);
63 // schema does not exist
64 msg(sprintf('Schema %s does not exist', $table), -1);
77 $column = new PageColumn(0, new Page(),
[all...]

12