Hi Amos, I already created a hook overriding BaseControlPanelEntry but nothing happens,
Do I have to reference this new class in liferay-portlet.xml?
This is my configuration in the hook:
portal.properties
1control.panel.entry.class.default=com.hook.MyDefaultControlPanelEntry
liferay-hook.xml
1
2<hook>
3 <portal-properties>portal.properties</portal-properties>
4</hook>
MyDefaultControlPanelEntry.java
1public class MyDefaultControlPanelEntry extends BaseControlPanelEntry {
2
3 @Override
4 public boolean isVisible(Portlet portlet, String category,
5 ThemeDisplay themeDisplay) throws Exception {
6 // TODO Auto-generated method stub
7 //return super.isVisible(portlet, category, themeDisplay);
8 if (category.equals(PortletCategoryKeys.CONTENT) || category.equals(PortletCategoryKeys.MY))
9 return false;
10 else
11 return super.isVisible(portlet, category, themeDisplay);
12 }
13
14 @Override
15 public boolean isVisible(PermissionChecker arg0, Portlet arg1)
16 throws Exception {
17 // TODO Auto-generated method stub
18 return false;
19 }
20
21}