Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rich
Developer Documentation
Commits
c76c9b74
Commit
c76c9b74
authored
Jan 10, 2022
by
eileen
🎱
Browse files
Add doc block
parent
7f8fd046
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/hooks/hook_civicrm_container.md
View file @
c76c9b74
...
...
@@ -36,8 +36,14 @@ This hook is available in CiviCRM 4.7+.
```
php
use
Symfony\Component\Config\Resource\FileResource
;
use
Symfony\Component\DependencyInjection\Definition
;
function
mymodule_civicrm_container
(
$container
)
{
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
/**
* Add my services to the container.
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
*/
function
mymodule_civicrm_container
(
ContainerBuilder
$container
)
{
$container
->
addResource
(
new
FileResource
(
__FILE__
));
$container
->
setDefinition
(
'mysvc'
,
new
Definition
(
'My\Class'
,
array
()))
->
setPublic
(
TRUE
);
}
...
...
Write
Preview
Supports
Markdown
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