Common
class Common (View source)
Common functions for Designer
Methods
Retrieves table info and returns it
Retrieves table column info
Returns JavaScript code for initializing vars
Returns all indices
Return j_tab and h_tab arrays
Returns table positions of a given pdf page
Returns page name of a given pdf page
Deletes a given pdf page and its corresponding coordinates
Returns the id of the default pdf page of the database.
Get the status if the page already exists If no such exists, returns negative index.
Get the id of the page to load. If a default page exists it will be returned.
Creates a new page and returns its auto-incrementing id
Saves positions of table(s) of a given pdf page
Saves the display field for a table.
Adds a new foreign relation
Removes a foreign relation
Save value for a designer setting
Details
__construct(DatabaseInterface $dbi, Relation $relation)
No description
array
getTablesInfo(string|null $db = null, string|null $table = null)
Retrieves table info and returns it
array
getColumnsInfo(array $designerTables)
Retrieves table column info
array
getScriptContr(array $designerTables)
Returns JavaScript code for initializing vars
array
getAllKeys(array $designerTables)
Returns all indices
array
getScriptTabs(array $designerTables)
Return j_tab and h_tab arrays
array
getTablePositions(int $pg)
Returns table positions of a given pdf page
string|null
getPageName(int $pg)
Returns page name of a given pdf page
bool
deletePage(int $pg)
Deletes a given pdf page and its corresponding coordinates
int
getDefaultPage(string $db)
Returns the id of the default pdf page of the database.
Default page is the one which has the same name as the database.
bool
getPageExists(string $pg)
Get the status if the page already exists If no such exists, returns negative index.
int
getLoadingPage(string $db)
Get the id of the page to load. If a default page exists it will be returned.
If no such exists, returns the id of the first page of the database.
int|null
createNewPage(string $pageName, string $db)
Creates a new page and returns its auto-incrementing id
bool
saveTablePositions(int $pg)
Saves positions of table(s) of a given pdf page
array
saveDisplayField(string $db, string $table, string $field)
Saves the display field for a table.
array
addNewRelation(string $t1, string $f1, string $t2, string $f2, string $onDelete, string $onUpdate, string $db1, string $db2)
Adds a new foreign relation
array
removeRelation(string $t1, string $f1, string $t2, string $f2)
Removes a foreign relation
bool
saveSetting(string $index, string $value)
Save value for a designer setting