setPublishArticlesAction() public method

Set the front page state to switch to when the "publish time" arrives: 'Y' for Yes, or 'N' for No.
public setPublishArticlesAction ( string $p_value ) : mixed
$p_value string
return mixed
$issue = new Issue(1, 1, $issueId);
$issue->create($issueId);
$issue->fetch();
$issue->dumpToHtml();
$article1 = new Article(1, 1, $issueId, 1);
$article1->create('fastnews', 'issue schueduled publish test '.rand());
$article2 = new Article(1, 1, $issueId, 1);
$article2->create('fastnews', 'issue schueduled publish test '.rand());

// Create issue publish event
echo "Creating issue publish event...<br>";
$datetime = strftime("%Y-%m-%d %H:%M:00");
$issuePublishEvent = new IssuePublish(1, $issueId, 1, $datetime);
$issuePublishEvent->create();
$issuePublishEvent->setPublishAction('P');
$issuePublishEvent->setPublishArticlesAction('Y');
$issuePublishEvent->fetch();
$issuePublishEvent->dumpToHtml();

echo "Executing pending events:<br>";
$events = IssuePublish::GetPendingActions();
foreach ($events as $event) {
    $event->doAction();
    $event->dumpToHtml();
}

// Check if issues are published
echo "Is the issue published?<br>";
$issue->fetch();
$issue->dumpToHtml();
}

$created = 0;
if ($correct) {
    $issuePublishExists = true;
	$publish_time = $publish_date . " " . $publish_hour . ":" . $publish_min . ":00";
    $issuePublishObj = new IssuePublish($event_id);
	if (!$issuePublishObj->exists()) {
	    $issuePublishObj->create();
	    $issuePublishObj->setPublicationId($Pub);
	    $issuePublishObj->setIssueNumber($Issue);
	    $issuePublishObj->setLanguageId($Language);
	    $issuePublishExists = false;
	}
    $issuePublishObj->setPublishAction($action);
    $issuePublishObj->setPublishArticlesAction($publish_articles);
    $issuePublishObj->setActionTime($publish_time);
	$created = 1;
}
if ($created) {

        $action = ($issuePublishExists) ? 'updated' : 'added';
        $issueObj = new Issue($Pub, $Language, $Issue);
        $logtext = getGS('Scheduled action $1 for issue #$2: "$3" (Publication: $4)', $action, $Issue, $issueObj->getName(), $Pub);
        Log::Message($logtext, $g_user->getUserId(), 16);
        camp_html_goto_page("/$ADMIN/issues/edit.php?Pub=$Pub&Issue=$Issue&Language=$Language");
}

$issueObj = new Issue($Pub, $Language, $Issue);
$publicationObj = new Publication($Pub);
$crumbs = array("Pub" => $publicationObj, "Issue" => $issueObj);