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
moodle
moodle
Commits
2c2171bd
Commit
2c2171bd
authored
Dec 09, 2014
by
Frederic Massart
Browse files
MDL-45295 core_block: Removing obsolete method preferred_width()
parent
d87bcfb3
Changes
7
Hide whitespace changes
Inline
Side-by-side
blocks/calendar_month/block_calendar_month.php
View file @
2c2171bd
...
...
@@ -30,15 +30,6 @@ class block_calendar_month extends block_base {
$this
->
title
=
get_string
(
'pluginname'
,
'block_calendar_month'
);
}
/**
* Return preferred_width.
*
* @return int
*/
public
function
preferred_width
()
{
return
210
;
}
/**
* Return the content of this block.
*
...
...
blocks/course_summary/block_course_summary.php
View file @
2c2171bd
...
...
@@ -74,10 +74,6 @@ class block_course_summary extends block_base {
return
true
;
}
function
preferred_width
()
{
return
210
;
}
}
blocks/moodleblock.class.php
View file @
2c2171bd
...
...
@@ -326,11 +326,6 @@ class block_base {
$correct
=
false
;
}
$width
=
$this
->
preferred_width
();
if
(
!
is_int
(
$width
)
||
$width
<=
0
)
{
$errors
[]
=
'invalid_width'
;
$correct
=
false
;
}
return
$correct
;
}
...
...
@@ -594,17 +589,6 @@ class block_base {
return
array
(
'moodle/block:view'
,
'moodle/block:edit'
);
}
// Methods deprecated in Moodle 2.0 ========================================
/**
* Default case: the block wants to be 180 pixels wide
* @deprecated since Moodle 2.0.
* @return int
*/
function
preferred_width
()
{
return
180
;
}
/**
* Can be overridden by the block to prevent the block from being dockable.
*
...
...
blocks/rss_client/block_rss_client.php
View file @
2c2171bd
...
...
@@ -28,10 +28,6 @@
$this
->
title
=
get_string
(
'pluginname'
,
'block_rss_client'
);
}
function
preferred_width
()
{
return
210
;
}
function
applicable_formats
()
{
return
array
(
'all'
=>
true
,
'tag'
=>
false
);
// Needs work to make it work on tags MDL-11960
}
...
...
blocks/tag_flickr/block_tag_flickr.php
View file @
2c2171bd
...
...
@@ -43,10 +43,6 @@ class block_tag_flickr extends block_base {
return
true
;
}
function
preferred_width
()
{
return
170
;
}
function
get_content
()
{
global
$CFG
,
$USER
;
...
...
blocks/tag_youtube/block_tag_youtube.php
View file @
2c2171bd
...
...
@@ -45,10 +45,6 @@ class block_tag_youtube extends block_base {
return
true
;
}
function
preferred_width
()
{
return
140
;
}
function
get_content
()
{
global
$CFG
;
...
...
blocks/upgrade.txt
View file @
2c2171bd
This files describes API changes in /blocks/* - activity modules,
information provided here is intended especially for developers.
=== 2.9 ===
* The obsolete method preferred_width() was removed.
=== 2.8 ===
* The instance_config_print() function was removed. It was deprecated in
...
...
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