Error: Class 'Drupal\Component\Render\FormattableMarkup' not found in custome_module()

by Harish   Last Updated June 12, 2019 06:07 AM

I have been working to insert a edit link for each row in a table for that...

function my_sub() { $results = db_query("SELECT * FROM {my_form}");

$header = array(t('NAME'), t('EMAIL-ID'), t('QUESTION-1'), t('QUESTION-2'), t('QUESTION-3'), t('EDIT')); $rows = array();

foreach($results AS $result) { $rows[] = array( $result->name, $result->email, $result->question1, $result->question2, $result->question3, Line 43 - array('data' => new FormattableMarkup('@name', [':link' => $entry['http://localhost:8080/drupal/my_form'], '@name' => $entry['edit']]) ), ); } return theme('table',array('header' => $header, 'rows' => $rows)); }

?>

The problem is Error: Class 'Drupal\Component\Render\FormattableMarkup' not found in my_sub() (line 43 of C:\xampp\htdocs\drupal\sites\all\modules\Fetch_data_db\my_sub.module).



Related Questions


Updated July 14, 2015 14:03 PM

Updated August 15, 2015 17:03 PM

Updated May 14, 2015 15:03 PM

Updated April 07, 2015 18:03 PM

Updated June 02, 2015 14:03 PM