Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Commits
bcb0aedb
Commit
bcb0aedb
authored
8 years ago
by
Carsten Rose
Browse files
Options
Downloads
Patches
Plain Diff
Manual.rst: add some example for TypeAhead and for saving LDAP value.
parent
031296d7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extension/Documentation/Manual.rst
+100
-10
100 additions, 10 deletions
extension/Documentation/Manual.rst
with
100 additions
and
10 deletions
extension/Documentation/Manual.rst
+
100
−
10
View file @
bcb0aedb
...
...
@@ -810,7 +810,7 @@ of the *Form*. If LDAP access is:
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAheadLdap | - | Enable LDAP as 'Typeahead' data source | | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAhead
l
dapSearch | (|(cn=*?*)(mail=*?*))
| Regular LDAP search expresssion | x | x | TA |
| typeAhead
L
dapSearch |
`
(|(cn=*?*)(mail=*?*))
`
| Regular LDAP search expresssion | x | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
| typeAheadLdapValuePrintf | `'%s / %s', cn, email` | Custom format to disply attributes, as value | x | x | TA |
+--------------------------+----------------------------------+------------------------------------------------------------+------+-------------+----------+
...
...
@@ -841,7 +841,7 @@ The *FormElement.parameter*=*typeAheadLdap* will trigger LDAP searches on every
* *ldapServer* = `directory.example.com`
* *ldapBaseDn* = `ou=Addressbook,dc=example,dc=com`
* *typeAhead
l
dapSearch* = `(|(cn=*?*)(mail=*?*))`
* *typeAhead
L
dapSearch* = `(|(cn=*?*)(mail=*?*))`
* *typeAheadLdapValuePrintf* = `'%s / %s', cn, email`
* *typeAheadLdapKeyPrintf* = `'%s', email`
...
...
@@ -866,7 +866,9 @@ Fill STORE LDAP (FSL)
---------------------
Before processing a *FormElement*, an optional configured FLS-action loads **one** record from a LDAP directory and stores
the named attributes in STORE_LDAP. FLS is triggered on *Form*
the named attributes in STORE_LDAP. If the LDAP search query selects more than one record, only the first record is processed.
The attributes names always becomes lowercase (PHP implentation detail on get_ldap_entries()) in the store. To make
accessing STORE_LDAP easily, the keys are implemented case insensitive for this specific store. FLS is triggered during *Form*-...
* load,
* dynamic update,
* save.
...
...
@@ -876,17 +878,17 @@ are available via `{{<attributename>:L:allbut:s}}` during the regular *FormEleme
a sanatize class and optional escaping on further processing of those data.
Important: LDAP access might slow down the *Form* processing on load, update or save! The timeout (default: 3 seconds) have
to be multiplied by number of access. E.g. a broken LDAP connection and 3 *FormELements* with *FSL*
to be multiplied by
the
number of access
es
. E.g. a broken LDAP connection and 3 *FormELements* with *FSL*
results to 9 seconds delay on save. Also be prepared not to receive the expected data.
* *FormElement.parameter.fillStoreLdap* - activate the mode *Fill S* - no value is needed, the existence is suffucient.
* *Form.parameter* or *FormElement.parameter*:
* *ldapServer* = directory.example.com
* *ldapBaseDn* = ou=Addressbook,dc=example,dc=com
* *typeAhead
l
dapSearch* = (|(cn=*?*)(mail=*?*))
* *ldapAttributes* = givenName, sn, telephoneNumber, email
* *ldapSearch* = (mail={{email::l}})
* *ldapServer* =
`
directory.example.com
`
* *ldapBaseDn* =
`
ou=Addressbook,dc=example,dc=com
`
* *typeAhead
L
dapSearch* =
`
(|(cn=*?*)(mail=*?*))
`
* *ldapAttributes* =
`
givenName, sn, telephoneNumber, email
`
* *ldapSearch* =
`
(mail={{email::l}})
`
After filling the store, access the content via `{{<attributename>:allbut:L:s}}`.
...
...
@@ -1026,7 +1028,7 @@ parameter
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdap | - | Enable LDAP as 'Typeahead' data source |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAhead
l
dapSearch | string | Regular LDAP search expresssion. E.g.: `(|(cn=*?*)(mail=*?*))` |
| typeAhead
L
dapSearch | string | Regular LDAP search expresssion. E.g.: `(|(cn=*?*)(mail=*?*))` |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapValuePrintf | string | Value formatting of LDAP result, per entry. E.g.: `'%s / %s / %s', mail, roomnumber, telephonenumber` |
+--------------------------+--------+----------------------------------------------------------------------------------------------------------+
...
...
@@ -2594,6 +2596,94 @@ Table: Note
sqlDelete={{DELETE FROM Note WHERE id={{slaveId}} LIMIT 1}}
sqlAfter={{UPDATE Person SET noteIdAvatar={{slaveId}} WHERE id={{id:R0}} LIMIT 1
Typeahead: SQL
^^^^^^^^^^^^^^
Table: Person
+---------------------+--------------+
| Name | Type |
+=====================+==============+
| id | int |
+---------------------+--------------+
| name | varchar(255) |
+---------------------+--------------+
* Form:
* Name: PersonNameTypeahead
* Table: Person
* FormElements
* Name: name
* Type: text
* Label: Name
* Parameter::
typeAheadSql = SELECT name WHERE name LIKE ? OR firstName LIKE ? LIMIT 100
Typeahead: LDAP with additional values
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Table: Person
+---------------------+--------------+
| Name | Type |
+=====================+==============+
| id | int |
+---------------------+--------------+
| name | varchar(255) |
+---------------------+--------------+
| firstname | varchar(255) |
+---------------------+--------------+
| email | varchar(255) |
+---------------------+--------------+
* Form:
* Name: PersonNameTypeaheadSetNames
* Table: Person
* Parameter::
ldapServer = directory.example.com
ldapBaseDn = ou=Addressbook,dc=example,dc=com
* FormElements
* Name: email
* Class: native
* Type: text
* Label: Email
* Note: Name: {{cn:LE}}<br>Email: {{mail:LE}}
* dynamicUpdate: checked
* Parameter::
# Typeahead
typeAheadLdapSearch = (|(cn=*?*)(mail=*?*))
typeAheadLdapValuePrintf ‘%s / %s’, cn, email
typeAheadLdapKeyPrintf ‘%s’, email
# dynamicUpdate: show note
fillStoreLdap
ldapSearch = (mail={{email::alnumx}})
ldapAttributes = cn, email
* Name: fillLdapValues
* Class: action
* Type: afterSave
* Parameter::
fillStoreLdap
ldapSearch = (mail={{email::alnumx}})
ldapAttributes = cn, email
slaveId={{id:R0}}
sqlUpdate={{ UPDATE Person AS p SET p.name='{{cn:L:alnumx:s}}' WHERE p.id={{slaveId}} LIMIT 1 }}
FAQ
---
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment