Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
949c2d14
Commit
949c2d14
authored
Jan 25, 2008
by
Clare Lenihan
Committed by
Clare Lenihan
Jan 25, 2008
Browse files
changed one blog field blocktype so it gets the title from the field selected
parent
99974b6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/resume/blocktype/resumefield/lib.php
View file @
949c2d14
...
...
@@ -40,6 +40,21 @@ class PluginBlocktypeResumefield extends PluginBlocktype {
return
array
(
'resume'
);
}
/**
* Optional method. If exists, allows this class to decide the title for
* all blockinstances of this type
*/
public
static
function
get_instance_title
(
BlockInstance
$bi
)
{
$configdata
=
$bi
->
get
(
'configdata'
);
if
(
!
empty
(
$configdata
[
'artefactid'
]))
{
require_once
(
get_config
(
'docroot'
)
.
'artefact/lib.php'
);
$resumefield
=
artefact_instance_from_id
(
$configdata
[
'artefactid'
]);
return
$resumefield
->
get
(
'title'
);
}
return
''
;
}
public
static
function
render_instance
(
BlockInstance
$instance
)
{
require_once
(
get_config
(
'docroot'
)
.
'artefact/lib.php'
);
$smarty
=
smarty_core
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment