The second week of Donald Trump’s Manhattan criminal trial was dominated by four days of testimony by David Pecker, the former publisher of The National Enquirer, who detailed his efforts to safeguard Mr. Trump’s 2016 presidential campaign.

Mr. Pecker, a longtime associate of the former president, talked at length about a “catch and kill” scheme that he said he had entered into with Mr. Trump and his former lawyer, Michael Cohen, during a 2015 meeting at Trump Tower. The publisher said he would purchase the rights to unsavory stories he had no intention of running.

His testimony also teed up the story of Stormy Daniels, a porn star who claims to have had sex with Mr. Trump in 2006 and received a hush-money payment in the days before the 2016 election, a deal at the center of the case.

Mr. Trump is charged with 34 felony counts of falsifying business records in an effort to conceal the payment. If convicted, he could face four years in prison. Mr. Trump has pleaded not guilty and denied that he had sex with Ms. Daniels.

The week also brought more accusations that Mr. Trump had violated a gag order prohibiting him from attacking witnesses, prosecutors and jurors. Justice Juan M. Merchan has not ruled on the prosecution’s request to hold Mr. Trump in contempt, and said he would hold another hearing next Thursday to address allegations of new violations.

Here’s what happened during the second week, and eighth day, of Mr. Trump’s trial:

Prosecutors and defense lawyers presented dueling portraits of Mr. Trump’s actions.

Prosecutors sketched a secret scheme to influence the 2016 election. They said Mr. Trump directed men in his inner circle to suppress negative stories about him and then agreed to cover up the payment to Ms. Daniels after taking the White House.