Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
d16ea7d8
Commit
d16ea7d8
authored
Sep 06, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
e45ae7d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
I18n.php
lib/Doctrine/Template/I18n.php
+16
-6
No files found.
lib/Doctrine/Template/I18n.php
View file @
d16ea7d8
...
...
@@ -31,19 +31,29 @@
*/
class
Doctrine_Template_I18n
extends
Doctrine_Template
{
protected
$_i18n
;
public
function
__construct
(
array
$options
)
{
$this
->
_
i18
n
=
new
Doctrine_I18n
(
$options
);
$this
->
_
plugi
n
=
new
Doctrine_I18n
(
$options
);
}
public
function
setUp
()
{
$this
->
_i18n
->
setOption
(
'table'
,
$this
->
_table
);
$this
->
_i18n
->
buildDefinition
(
$this
->
_table
);
$this
->
_plugin
->
setOption
(
'table'
,
$this
->
_table
);
$name
=
$this
->
_table
->
getComponentName
();
$className
=
$this
->
_plugin
->
getOption
(
'className'
);
if
(
strpos
(
$className
,
'%CLASS%'
)
!==
false
)
{
$this
->
_plugin
->
setOption
(
'className'
,
str_replace
(
'%CLASS%'
,
$name
,
$className
));
$className
=
$this
->
_plugin
->
getOption
(
'className'
);
}
$this
->
_plugin
->
buildDefinition
(
$this
->
_table
);
$id
=
$this
->
_table
->
getIdentifier
();
$this
->
hasMany
(
$className
.
' as Translation'
,
array
(
'local'
=>
$id
,
'foreign'
=>
$id
));
}
public
function
getI18n
()
{
return
$this
->
_
i18
n
;
return
$this
->
_
plugi
n
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment