Skip to content

Commit

Permalink
Merge Release 1.1.0 into master (#136)
Browse files Browse the repository at this point in the history
* Issue #00 chore: Update bump.php

* Reports.php updated to add function get report param

Reports.php updated to add function get report param

* Reports.php updated to add function get report param (#134)

Reports.php updated to add function get report param

* Update tjreportsfields.php
  • Loading branch information
manojLondhe authored Jun 28, 2019
1 parent 7f6b8ed commit a906c54
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plugins/content/tjreportsfields/tjreportsfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public function __construct(&$subject, $config)
*/
public function onContentBeforeSave($context, $row, $isNew)
{
// Run this plugin only for com_fields.field form
if ($context !== 'com_fields.field')
{
return;
}

// $context = com_fields.field

JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_fields/tables');
Expand Down Expand Up @@ -182,6 +188,12 @@ public function onContentAfterSave($context, $field, $isNew)
*/
public function onContentAfterDelete($context, $field)
{
// Run this plugin only for com_fields.field form
if ($context !== 'com_fields.field')
{
return;
}

// Call set custom field table name
$this->setCustomFieldsTableName($field->context);

Expand Down
19 changes: 19 additions & 0 deletions tjreports/site/models/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,25 @@ public function getReportLink($reportToLink, $filters)
}
}

/**
* Method to get id of the report having default set as 1
*
* @param STRING $pluginName Plugin Name
*
* @return Integer
*
* @since 1.1.0
*/
public function getReportParams($reportId)
{
$db = JFactory::getDBO();
JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjreports/tables');
$reportTable = JTable::getInstance('Tjreport', 'TjreportsTable', array('dbo', $db));
$reportTable->load($reportId);

return new JRegistry($reportTable->param);
}

/**
* Method to get id of the report having default set as 1
*
Expand Down

0 comments on commit a906c54

Please sign in to comment.